From da7277d6f9ef98ea30f6cac22fe33563075581e6 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 1 Jul 2024 01:02:44 +0200 Subject: provide default category, PoS app needs it --- src/backend/taler-merchant-httpd_private-get-pos.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/backend/taler-merchant-httpd_private-get-pos.c b/src/backend/taler-merchant-httpd_private-get-pos.c index 4c14b6ae..d1230243 100644 --- a/src/backend/taler-merchant-httpd_private-get-pos.c +++ b/src/backend/taler-merchant-httpd_private-get-pos.c @@ -65,6 +65,14 @@ add_product (void *cls, 0 == json_array_append_new ( cata, json_integer (categories[i]))); + if (0 == num_categories) + { + // If there is no category, we return the default category + GNUNET_assert ( + 0 == json_array_append_new ( + cata, + json_integer (0))); + } GNUNET_assert ( 0 == json_array_append_new ( -- cgit v1.2.3