diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-07-30 17:24:16 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-07-30 17:24:18 +0200 |
commit | cbb905a9aae891c6c3af5ead5709951c4f038a2a (patch) | |
tree | a4d2ef3818c58924329e9db8eb588ac07aec129c /src/exchange/taler-exchange-httpd_reserves_get.c | |
parent | 7e409c37ab6f339811441c8803109afb218d0854 (diff) | |
download | exchange-cbb905a9aae891c6c3af5ead5709951c4f038a2a.tar.gz exchange-cbb905a9aae891c6c3af5ead5709951c4f038a2a.tar.bz2 exchange-cbb905a9aae891c6c3af5ead5709951c4f038a2a.zip |
-eliminate more json_pack format strings
Diffstat (limited to 'src/exchange/taler-exchange-httpd_reserves_get.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_reserves_get.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/exchange/taler-exchange-httpd_reserves_get.c b/src/exchange/taler-exchange-httpd_reserves_get.c index b901afbbc..6ad393a28 100644 --- a/src/exchange/taler-exchange-httpd_reserves_get.c +++ b/src/exchange/taler-exchange-httpd_reserves_get.c @@ -40,7 +40,6 @@ static MHD_RESULT reply_reserve_history_success (struct MHD_Connection *connection, const struct TALER_EXCHANGEDB_ReserveHistory *rh) { - json_t *json_balance; json_t *json_history; struct TALER_Amount balance; @@ -51,12 +50,13 @@ reply_reserve_history_success (struct MHD_Connection *connection, MHD_HTTP_INTERNAL_SERVER_ERROR, TALER_EC_GENERIC_JSON_ALLOCATION_FAILURE, NULL); - json_balance = TALER_JSON_from_amount (&balance); - return TALER_MHD_reply_json_pack (connection, - MHD_HTTP_OK, - "{s:o, s:o}", - "balance", json_balance, - "history", json_history); + return TALER_MHD_REPLY_JSON_PACK ( + connection, + MHD_HTTP_OK, + TALER_JSON_pack_amount ("balance", + &balance), + GNUNET_JSON_pack_array_steal ("history", + json_history)); } |