commit da7277d6f9ef98ea30f6cac22fe33563075581e6
parent fefa93812b15fd03ddf683219fabfe6d4e4e9244
Author: Florian Dold <florian@dold.me>
Date: Mon, 1 Jul 2024 01:02:44 +0200
provide default category, PoS app needs it
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git 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 (