merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 7aace51b40c2b63a64aa5d0e7f66b9819b0a07f6
parent 9e92dc1004bedde592b14ad4a50071562a90ddd8
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue, 21 Feb 2023 18:03:17 +0100

make pos_algo optional

Diffstat:
Msrc/backend/taler-merchant-httpd_private-patch-templates-ID.c | 5+++--
Msrc/backend/taler-merchant-httpd_private-post-templates.c | 7++++---
2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_private-patch-templates-ID.c b/src/backend/taler-merchant-httpd_private-patch-templates-ID.c @@ -113,8 +113,9 @@ TMH_private_patch_templates_ID (const struct TMH_RequestHandler *rh, struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_string ("template_description", (const char **) &tp.template_description), - GNUNET_JSON_spec_uint32 ("pos_algorithm", - &pos_algorithm), + GNUNET_JSON_spec_mark_optional ( + GNUNET_JSON_spec_uint32 ("pos_algorithm", + &pos_algorithm)), GNUNET_JSON_spec_mark_optional ( GNUNET_JSON_spec_string ("pos_key", (const char **) &tp.pos_key), diff --git a/src/backend/taler-merchant-httpd_private-post-templates.c b/src/backend/taler-merchant-httpd_private-post-templates.c @@ -67,14 +67,15 @@ TMH_private_post_templates (const struct TMH_RequestHandler *rh, struct TALER_MERCHANTDB_TemplateDetails tp = { 0 }; const char *template_id; enum GNUNET_DB_QueryStatus qs; - uint32_t pos_algorithm; + uint32_t pos_algorithm = 0; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_string ("template_id", &template_id), GNUNET_JSON_spec_string ("template_description", (const char **) &tp.template_description), - GNUNET_JSON_spec_uint32 ("pos_algorithm", - &pos_algorithm), + GNUNET_JSON_spec_mark_optional ( + GNUNET_JSON_spec_uint32 ("pos_algorithm", + &pos_algorithm)), GNUNET_JSON_spec_mark_optional ( GNUNET_JSON_spec_string ("pos_key", (const char **) &tp.pos_key),