This commit is contained in:
swrup 2026-02-23 07:24:40 +01:00
parent af355249fc
commit 06b96ddd09
2 changed files with 3 additions and 4 deletions

View file

@ -15,7 +15,6 @@ open Crypto
open Signatures
module DenominationHash = Hash.DenominationHash
let encode_exn jsont v = Jsont_bytesrw.encode_string jsont v |> Result.get_ok
let encode jsont v = Jsont_bytesrw.encode_string jsont v
let decode jsont v = Jsont_bytesrw.decode_string jsont v

View file

@ -234,12 +234,12 @@ let keys req server _env =
let* last_issue_date =
match Vif.Queries.get req "last_issue_date" with
| [] -> Ok None
| v :: _ -> (
match int_of_string_opt v with
| s :: _ -> (
match Int64.of_string_opt s with
| None ->
Error
"invalid `?last_issue_date` query param, int_of_string failure"
| Some n -> Ok (Some (Time.Timestamp.of_s (Int64.of_int n))))
| Some n -> Ok (Some (Timestamp.of_s n)))
in
let* v = mk_keys ~db_conn keys ~last_issue_date in
let s = Api.encode_exn jsont v in