summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_private-get-reserves-ID.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-06-22 20:30:25 +0200
committerChristian Grothoff <christian@grothoff.org>2020-06-22 20:30:25 +0200
commit0748ecde7be1fb9537382d7cadc38031fbc696ff (patch)
tree9e4d6dbacb1e7d0c48d27e8f441f497d3a0f6cef /src/backend/taler-merchant-httpd_private-get-reserves-ID.c
parentd83304e2a3af18480e3c83077c54a1b532904d2b (diff)
downloadmerchant-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.c7
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);
}