diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-08-01 19:59:40 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-08-01 19:59:44 +0200 |
commit | bcf5863eb45523615540ac99ab81fd131bd2f413 (patch) | |
tree | 0086e76a9009289073c7b07338d072d6baac8e11 /src/backend/taler-merchant-httpd_private-get-products.c | |
parent | c4d13313b9beff9b8b2948604ae0f6561721c33c (diff) | |
download | merchant-bcf5863eb45523615540ac99ab81fd131bd2f413.tar.gz merchant-bcf5863eb45523615540ac99ab81fd131bd2f413.tar.bz2 merchant-bcf5863eb45523615540ac99ab81fd131bd2f413.zip |
-more json_pack fixes
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-get-products.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-get-products.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/backend/taler-merchant-httpd_private-get-products.c b/src/backend/taler-merchant-httpd_private-get-products.c index fb9b2192..6c683887 100644 --- a/src/backend/taler-merchant-httpd_private-get-products.c +++ b/src/backend/taler-merchant-httpd_private-get-products.c @@ -1,6 +1,6 @@ /* This file is part of TALER - (C) 2019, 2020 Taler Systems SA + (C) 2019, 2020, 2021 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software @@ -37,10 +37,9 @@ add_product (void *cls, GNUNET_assert (0 == json_array_append_new ( pa, - json_pack ( - "{s:s}", - "product_id", - product_id))); + GNUNET_JSON_PACK ( + GNUNET_JSON_pack_string ("product_id", + product_id)))); } @@ -75,10 +74,10 @@ TMH_private_get_products (const struct TMH_RequestHandler *rh, TALER_EC_GENERIC_DB_FETCH_FAILED, NULL); } - return TALER_MHD_reply_json_pack (connection, + return TALER_MHD_REPLY_JSON_PACK (connection, MHD_HTTP_OK, - "{s:o}", - "products", pa); + GNUNET_JSON_pack_array_steal ("products", + pa)); } |