summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_private-get-tips.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-get-tips.c')
-rw-r--r--src/backend/taler-merchant-httpd_private-get-tips.c26
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));
}