summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_private-post-templates.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-templates.c')
-rw-r--r--src/backend/taler-merchant-httpd_private-post-templates.c12
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);