diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-02-21 17:43:11 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-02-21 17:43:11 +0100 |
commit | 165c5337b1fc1df42521ab1cba520b7ddede6fdd (patch) | |
tree | c54051690eeef748157df657c6367e4bac5c5bf2 /src/backend/taler-merchant-httpd_private-post-templates.c | |
parent | 7f4626d3c5ec3d4cafe6a8992741c085537a3037 (diff) | |
download | merchant-165c5337b1fc1df42521ab1cba520b7ddede6fdd.tar.gz merchant-165c5337b1fc1df42521ab1cba520b7ddede6fdd.tar.bz2 merchant-165c5337b1fc1df42521ab1cba520b7ddede6fdd.zip |
add algorithm identifier to client API
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-templates.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-templates.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-templates.c b/src/backend/taler-merchant-httpd_private-post-templates.c index ac2a9206..2ed76940 100644 --- a/src/backend/taler-merchant-httpd_private-post-templates.c +++ b/src/backend/taler-merchant-httpd_private-post-templates.c @@ -67,13 +67,16 @@ 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; 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_mark_optional( - GNUNET_JSON_spec_string ("image", + GNUNET_JSON_spec_uint32 ("pos_algorithm", + &pos_algorithm), + GNUNET_JSON_spec_mark_optional ( + GNUNET_JSON_spec_string ("pos_key", (const char **) &tp.pos_key), NULL), GNUNET_JSON_spec_json ("template_contract", @@ -96,6 +99,7 @@ TMH_private_post_templates (const struct TMH_RequestHandler *rh, : MHD_NO; } } + tp.pos_algorithm = (enum TALER_MerchantConfirmationAlgorithm) pos_algorithm; if (! TMH_template_contract_valid (tp.template_contract)) { GNUNET_break_op (0); @@ -185,8 +189,8 @@ TMH_private_post_templates (const struct TMH_RequestHandler *rh, if (GNUNET_DB_STATUS_SOFT_ERROR != qs) break; } -retry: - GNUNET_assert (GNUNET_DB_STATUS_SOFT_ERROR == qs); +retry: + GNUNET_assert (GNUNET_DB_STATUS_SOFT_ERROR == qs); TMH_db->rollback (TMH_db->cls); } /* for RETRIES loop */ GNUNET_JSON_parse_free (spec); |