We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51793f2 commit 05aa5c6Copy full SHA for 05aa5c6
pegasus/lib/api/proxy/appBskyActorGetPreferences.ml
@@ -1,6 +1,3 @@
1
-open Lexicons.App.Bsky.Actor.Defs
2
-open Lexicons.App.Bsky.Actor.GetPreferences.Main
3
-
4
let handler =
5
Xrpc.handler ~auth:Authorization (fun {db; auth; _} ->
6
let did = Auth.get_authed_did_exn auth in
@@ -11,6 +8,7 @@ let handler =
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 )
+ (* skip yojson roundtrip because that would strip extra properties *)
+ Dream.json
+ @@ Format.sprintf {|{ "preferences": %s }|}
+ (Yojson.Safe.to_string preferences) )
0 commit comments