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