Something went wrong. Try again.
An atproto PDS written in Go
Something went wrong. Try again.
12345678910111213141516171819202122232425package server
import ( "encoding/json"
"github.com/haileyok/cocoon/models" "github.com/labstack/echo/v4")
// This is kinda lame. Not great to implement app.bsky in the pds, but alas
func (s *Server) handleActorGetPreferences(e echo.Context) error { repo := e.Get("repo").(*models.RepoActor)
var prefs map[string]any err := json.Unmarshal(repo.Preferences, &prefs) if err != nil || prefs["preferences"] == nil { prefs = map[string]any{ "preferences": []any{}, } }
return e.JSON(200, prefs)}