From 867761a2e764c6c6327434585498ed62c54f6eac Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Sun, 3 Dec 2023 12:52:07 -0600 Subject: Formatting, support whitelist --- lib/user.ml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'lib/user.ml') diff --git a/lib/user.ml b/lib/user.ml index f0ac7cf..ba802c0 100644 --- a/lib/user.ml +++ b/lib/user.ml @@ -17,14 +17,12 @@ let activity_header = Some (Header.of_list [ ("Accept", "application/activity+json") ]) let get_user actor_url = - try%lwt - let%lwt _, body = - Client.get ?headers:activity_header (Uri.of_string actor_url) - in - body |> Cohttp_lwt.Body.to_string >|= fun body -> - let body = Yojson.Safe.from_string body |> t_of_yojson in - Ok body - with exn -> Lwt.return (Error exn) + let%lwt _, body = + Client.get ?headers:activity_header (Uri.of_string actor_url) + in + body |> Cohttp_lwt.Body.to_string >|= fun body -> + let body = Yojson.Safe.from_string body |> t_of_yojson in + body let get_public_pem user = user.public_key.public_key_pem |> Cstruct.of_string -- cgit v1.2.3