objective categorical abstract machine language personal data server

Don't parse preferences to record type before returning them

futur.blue 05aa5c69 51793f23

verified
+4 -6
+4 -6
pegasus/lib/api/proxy/appBskyActorGetPreferences.ml
··· 1 - open Lexicons.App.Bsky.Actor.Defs 2 - open Lexicons.App.Bsky.Actor.GetPreferences.Main 3 - 4 1 let handler = 5 2 Xrpc.handler ~auth:Authorization (fun {db; auth; _} -> 6 3 let did = Auth.get_authed_did_exn auth in ··· 11 8 | None -> 12 9 Errors.internal_error () 13 10 in 14 - preferences |> preferences_of_yojson |> Result.get_ok 15 - |> (fun p -> {preferences= p}) 16 - |> output_to_yojson |> Yojson.Safe.to_string |> Dream.json ) 11 + (* skip yojson roundtrip because that would strip extra properties *) 12 + Dream.json 13 + @@ Format.sprintf {|{ "preferences": %s }|} 14 + (Yojson.Safe.to_string preferences) )