diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/taler-merchant-httpd.c | 2 | ||||
-rw-r--r-- | src/backend/taler-merchant-httpd_private-get-reserves-ID.c | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c index c9b22dd6..721861ca 100644 --- a/src/backend/taler-merchant-httpd.c +++ b/src/backend/taler-merchant-httpd.c @@ -890,7 +890,7 @@ url_handler (void *cls, }, /* GET /reserves: */ { - .url_prefix = "/reserves", + .url_prefix = "/reserves/", .have_id_segment = true, .method = MHD_HTTP_METHOD_GET, .handler = &TMH_private_get_reserves_ID 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), |