diff options
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-patch-templates-ID.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-patch-templates-ID.c | 12 |
1 files changed, 11 insertions, 1 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 index 68e0a478..6aebc033 100644 --- a/src/backend/taler-merchant-httpd_private-patch-templates-ID.c +++ b/src/backend/taler-merchant-httpd_private-patch-templates-ID.c @@ -1,6 +1,6 @@ /* This file is part of TALER - (C) 2022 Taler Systems SA + (C) 2022, 2024 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 @@ -112,6 +112,14 @@ TMH_private_patch_templates_ID (const struct TMH_RequestHandler *rh, NULL), GNUNET_JSON_spec_json ("template_contract", &tp.template_contract), + GNUNET_JSON_spec_mark_optional ( + GNUNET_JSON_spec_string ("required_currency", + (const char **) &tp.required_currency), + NULL), + GNUNET_JSON_spec_mark_optional ( + GNUNET_JSON_spec_json ("editable_defaults", + &tp.editable_defaults), + NULL), GNUNET_JSON_spec_end () }; @@ -138,6 +146,8 @@ TMH_private_patch_templates_ID (const struct TMH_RequestHandler *rh, TALER_EC_GENERIC_PARAMETER_MALFORMED, "template_contract"); } + // FIXME: sanity check on required_currency + // FIXME: sanity check on editable_defaults qs = TMH_db->update_template (TMH_db->cls, mi->settings.id, |