diff options
author | Jonathan Buchanan <jonathan.russ.buchanan@gmail.com> | 2020-06-15 21:08:33 -0400 |
---|---|---|
committer | Jonathan Buchanan <jonathan.russ.buchanan@gmail.com> | 2020-06-15 21:08:33 -0400 |
commit | 63c035bfffaec9b245da58828f7d6504278fc46e (patch) | |
tree | d0cf387fb1545bfcfb5f413236d92b6033ef721e /src/backend/taler-merchant-httpd_private-get-reserves-ID.c | |
parent | 1d22e4f8b263446f24fbdb3d2b92f7c1f2939f48 (diff) |
test for GET /private/reserves/
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-get-reserves-ID.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-get-reserves-ID.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/backend/taler-merchant-httpd_private-get-reserves-ID.c b/src/backend/taler-merchant-httpd_private-get-reserves-ID.c index d77a7bf9..2d789d0a 100644 --- a/src/backend/taler-merchant-httpd_private-get-reserves-ID.c +++ b/src/backend/taler-merchant-httpd_private-get-reserves-ID.c @@ -78,8 +78,13 @@ handle_reserve_details (void *cls, { struct GetReserveContext *ctx = cls; json_t *tips_json; + struct GNUNET_TIME_Absolute creation_time_round = creation_time; + struct GNUNET_TIME_Absolute expiration_time_round = expiration_time; - if (tips) + GNUNET_TIME_round_abs (&creation_time_round); + GNUNET_TIME_round_abs (&expiration_time_round); + + if (NULL != tips) { tips_json = json_array (); GNUNET_assert (NULL != tips_json); @@ -108,8 +113,8 @@ handle_reserve_details (void *cls, ctx->connection, MHD_HTTP_OK, "{s:o, s:o, s:o, s:o, s:o, s:o, s:o?}", - "creation_time", GNUNET_JSON_from_time_abs (creation_time), - "expiration_time", GNUNET_JSON_from_time_abs (expiration_time), + "creation_time", GNUNET_JSON_from_time_abs (creation_time_round), + "expiration_time", GNUNET_JSON_from_time_abs (expiration_time_round), "merchant_initial_amount", TALER_JSON_from_amount (merchant_initial_amount), "exchange_initial_amount", TALER_JSON_from_amount (exchange_initial_amount), "pickup_amount", TALER_JSON_from_amount (picked_up_amount), |