diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-08-01 18:57:26 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-08-01 18:57:30 +0200 |
commit | 41bbc3b3d8cf2ac9d90cd41b584aea8dac11a9e5 (patch) | |
tree | f447f94f018dff506a3c5a1f6042df3964520c1a /src/backend/taler-merchant-httpd_private-get-tips.c | |
parent | 1dede2835d0b7305794a68cd6cc6740e4d05d4e9 (diff) | |
download | merchant-41bbc3b3d8cf2ac9d90cd41b584aea8dac11a9e5.tar.gz merchant-41bbc3b3d8cf2ac9d90cd41b584aea8dac11a9e5.tar.bz2 merchant-41bbc3b3d8cf2ac9d90cd41b584aea8dac11a9e5.zip |
-more json_pack fixes
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-get-tips.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-get-tips.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/backend/taler-merchant-httpd_private-get-tips.c b/src/backend/taler-merchant-httpd_private-get-tips.c index 60e4900e..e222daae 100644 --- a/src/backend/taler-merchant-httpd_private-get-tips.c +++ b/src/backend/taler-merchant-httpd_private-get-tips.c @@ -1,6 +1,6 @@ /* This file is part of TALER - (C) 2020 Taler Systems SA + (C) 2020-2021 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -41,14 +41,13 @@ add_tip (void *cls, GNUNET_assert (0 == json_array_append_new ( pa, - json_pack ( - "{s:I, s:o, s:o}", - "row_id", - row_id, - "tip_id", - GNUNET_JSON_from_data_auto (&tip_id), - "tip_amount", - TALER_JSON_from_amount (&amount)))); + GNUNET_JSON_PACK ( + GNUNET_JSON_pack_uint64 ("row_id", + row_id), + GNUNET_JSON_pack_data_auto ("tip_id", + &tip_id), + TALER_JSON_pack_amount ("tip_amount", + &amount)))); } @@ -149,8 +148,9 @@ TMH_private_get_tips (const struct TMH_RequestHandler *rh, "tips"); } - return TALER_MHD_reply_json_pack (connection, - MHD_HTTP_OK, - "{s:o}", - "tips", pa); + return TALER_MHD_REPLY_JSON_PACK ( + connection, + MHD_HTTP_OK, + GNUNET_JSON_pack_array_steal ("tips", + pa)); } |