objective categorical abstract machine language personal data server
65
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix hermes blob type

futurGH 4fc0f7e9 5fc980ac

+30 -6
+4 -1
hermes/lib/hermes.ml
··· 1 - type blob = Types.blob = {ref_: Cid.t; mime_type: string; size: int64} 1 + type blob = Types.blob = 2 + {type_: string; ref: Cid.t; mime_type: string; size: int64} 2 3 3 4 exception Xrpc_error = Types.Xrpc_error 4 5 ··· 23 24 let make_credential_manager = Credential_manager.make 24 25 25 26 let login = Credential_manager.login 27 + 28 + let login_client = Credential_manager.login_client 26 29 27 30 let resume = Credential_manager.resume 28 31
+19 -1
hermes/lib/hermes.mli
··· 1 - type blob = {ref_: Cid.t; mime_type: string; size: int64} 1 + type blob = {type_: string; ref: Cid.t; mime_type: string; size: int64} 2 2 3 3 exception Xrpc_error of {status: int; error: string; message: string option} 4 4 ··· 24 24 25 25 val login : 26 26 credential_manager 27 + -> identifier:string 28 + -> password:string 29 + -> ?auth_factor_token:string 30 + -> unit 31 + -> client Lwt.t 32 + 33 + val login_client : 34 + credential_manager 35 + -> client 27 36 -> identifier:string 28 37 -> password:string 29 38 -> ?auth_factor_token:string ··· 186 195 187 196 val login : 188 197 t 198 + -> identifier:string 199 + -> password:string 200 + -> ?auth_factor_token:string 201 + -> unit 202 + -> Client.t Lwt.t 203 + 204 + val login_client : 205 + t 206 + -> Client.t 189 207 -> identifier:string 190 208 -> password:string 191 209 -> ?auth_factor_token:string
+5 -2
hermes/lib/types.ml
··· 1 1 (* core types for xrpc client *) 2 2 3 3 type blob = 4 - {ref_: Cid.t [@key "$link"]; mime_type: string [@key "mimeType"]; size: int64} 5 - [@@deriving yojson] 4 + { type_: string [@key "$type"] 5 + ; ref: Cid.t 6 + ; mime_type: string [@key "mimeType"] 7 + ; size: int64 } 8 + [@@deriving yojson {strict= false}] 6 9 7 10 type xrpc_error_payload = {error: string; message: string option [@default None]} 8 11 [@@deriving yojson {strict= false}]
+2 -2
hermes/test/test_types.ml
··· 13 13 match cid with 14 14 | Ok cid -> ( 15 15 let blob : Hermes.blob = 16 - {ref_= cid; mime_type= "image/png"; size= 12345L} 16 + {type_= "blob"; ref= cid; mime_type= "image/png"; size= 12345L} 17 17 in 18 18 let json = Hermes.blob_to_yojson blob in 19 19 let json_str = Yojson.Safe.to_string json in ··· 38 38 match cid with 39 39 | Ok cid -> ( 40 40 let original : Hermes.blob = 41 - {ref_= cid; mime_type= "image/jpeg"; size= 54321L} 41 + {type_= "blob"; ref= cid; mime_type= "image/jpeg"; size= 54321L} 42 42 in 43 43 let json = Hermes.blob_to_yojson original in 44 44 match Hermes.blob_of_yojson json with