diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-06-22 20:30:25 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-06-22 20:30:25 +0200 |
commit | 0748ecde7be1fb9537382d7cadc38031fbc696ff (patch) | |
tree | 9e4d6dbacb1e7d0c48d27e8f441f497d3a0f6cef /src/backend/taler-merchant-httpd_private-get-reserves-ID.c | |
parent | d83304e2a3af18480e3c83077c54a1b532904d2b (diff) | |
download | merchant-0748ecde7be1fb9537382d7cadc38031fbc696ff.tar.gz merchant-0748ecde7be1fb9537382d7cadc38031fbc696ff.tar.bz2 merchant-0748ecde7be1fb9537382d7cadc38031fbc696ff.zip |
return active-status of reserves from backenddb (fixes FIXMEs)
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 | 7 |
1 files changed, 5 insertions, 2 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 7e7c14a9..1945524a 100644 --- a/src/backend/taler-merchant-httpd_private-get-reserves-ID.c +++ b/src/backend/taler-merchant-httpd_private-get-reserves-ID.c @@ -62,6 +62,7 @@ struct GetReserveContext * @param picked_up_amount total of tips that were picked up from this reserve * @param committed_amount total of tips that the merchant committed to, but that were not * picked up yet + * @param active true if the reserve is still active (we have the private key) * @param tips_length length of the @a tips array * @param tips information about the tips created by this reserve */ @@ -73,6 +74,7 @@ handle_reserve_details (void *cls, const struct TALER_Amount *exchange_initial_amount, const struct TALER_Amount *picked_up_amount, const struct TALER_Amount *committed_amount, + bool active, unsigned int tips_length, const struct TALER_MERCHANTDB_TipDetails *tips) { @@ -112,14 +114,15 @@ handle_reserve_details (void *cls, ctx->res = TALER_MHD_reply_json_pack ( ctx->connection, MHD_HTTP_OK, - "{s:o, s:o, s:o, s:o, s:o, s:o, s:o?}", + "{s:o, s:o, s:o, s:o, s:o, s:o, s:o?, s:b}", "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), "committed_amount", TALER_JSON_from_amount (committed_amount), - "tips", tips_json); + "tips", tips_json, + "active", active); } |