summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_deposits_get.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-07-30 17:24:16 +0200
committerChristian Grothoff <christian@grothoff.org>2021-07-30 17:24:18 +0200
commitcbb905a9aae891c6c3af5ead5709951c4f038a2a (patch)
treea4d2ef3818c58924329e9db8eb588ac07aec129c /src/exchange/taler-exchange-httpd_deposits_get.c
parent7e409c37ab6f339811441c8803109afb218d0854 (diff)
downloadexchange-cbb905a9aae891c6c3af5ead5709951c4f038a2a.tar.gz
exchange-cbb905a9aae891c6c3af5ead5709951c4f038a2a.tar.bz2
exchange-cbb905a9aae891c6c3af5ead5709951c4f038a2a.zip
-eliminate more json_pack format strings
Diffstat (limited to 'src/exchange/taler-exchange-httpd_deposits_get.c')
-rw-r--r--src/exchange/taler-exchange-httpd_deposits_get.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/src/exchange/taler-exchange-httpd_deposits_get.c b/src/exchange/taler-exchange-httpd_deposits_get.c
index 90f28b4e..c51e0f42 100644
--- a/src/exchange/taler-exchange-httpd_deposits_get.c
+++ b/src/exchange/taler-exchange-httpd_deposits_get.c
@@ -78,20 +78,19 @@ reply_deposit_details (struct MHD_Connection *connection,
ec,
NULL);
}
- return TALER_MHD_reply_json_pack (connection,
- MHD_HTTP_OK,
- "{s:o, s:o, s:o, s:o, s:o}",
- "wtid", GNUNET_JSON_from_data_auto (
- wtid),
- "execution_time",
- GNUNET_JSON_from_time_abs (exec_time),
- "coin_contribution",
- TALER_JSON_from_amount (
- coin_contribution),
- "exchange_sig",
- GNUNET_JSON_from_data_auto (&sig),
- "exchange_pub",
- GNUNET_JSON_from_data_auto (&pub));
+ return TALER_MHD_REPLY_JSON_PACK (
+ connection,
+ MHD_HTTP_OK,
+ GNUNET_JSON_pack_data_auto ("wtid",
+ wtid),
+ GNUNET_JSON_pack_time_abs ("execution_time",
+ exec_time),
+ TALER_JSON_pack_amount ("coin_contribution",
+ coin_contribution),
+ GNUNET_JSON_pack_data_auto ("exchange_sig",
+ &sig),
+ GNUNET_JSON_pack_data_auto ("exchange_pub",
+ &pub));
}
@@ -279,12 +278,11 @@ handle_track_transaction_request (
&ctx))
return mhd_ret;
if (GNUNET_YES == ctx.pending)
- return TALER_MHD_reply_json_pack (connection,
- MHD_HTTP_ACCEPTED,
- "{s:o}",
- "execution_time",
- GNUNET_JSON_from_time_abs (
- ctx.execution_time));
+ return TALER_MHD_REPLY_JSON_PACK (
+ connection,
+ MHD_HTTP_ACCEPTED,
+ GNUNET_JSON_pack_time_abs ("execution_time",
+ ctx.execution_time));
if (GNUNET_SYSERR == ctx.pending)
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,