diff options
author | priscilla <priscilla.huang@efrei.net> | 2023-02-20 04:40:12 -0500 |
---|---|---|
committer | priscilla <priscilla.huang@efrei.net> | 2023-02-20 12:19:40 -0500 |
commit | 83c11d7428c6d4ba2e1749630724c39811a24241 (patch) | |
tree | f9b51c1c2b718166185a8d5338d21271996c2358 /src/backend/taler-merchant-httpd_private-post-templates.c | |
parent | 69341625aad4b0a1b3642103226f11c2ec4d943c (diff) |
pull changes
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-templates.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-templates.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-templates.c b/src/backend/taler-merchant-httpd_private-post-templates.c index 9cc33eaa..91f8c182 100644 --- a/src/backend/taler-merchant-httpd_private-post-templates.c +++ b/src/backend/taler-merchant-httpd_private-post-templates.c @@ -47,10 +47,8 @@ templates_equal (const struct TALER_MERCHANTDB_TemplateDetails *t1, { return ( (0 == strcmp (t1->template_description, t2->template_description)) && - ( ( (NULL == t1->image) && (NULL == t2->image) ) || - ( (NULL != t1->image) && (NULL != t2->image) && - (0 == strcmp (t1->image, - t2->image)) ) ) && + (0 == strcmp (t1->pos_key, + t2->pos_key) ) && (1 == json_equal (t1->template_contract, t2->template_contract)) ); } @@ -72,7 +70,7 @@ TMH_private_post_templates (const struct TMH_RequestHandler *rh, (const char **) &tp.template_description), GNUNET_JSON_spec_mark_optional( GNUNET_JSON_spec_string ("image", - (const char **) &tp.image), + (const char **) &tp.pos_key), NULL), GNUNET_JSON_spec_json ("template_contract", &tp.template_contract), @@ -107,17 +105,6 @@ TMH_private_post_templates (const struct TMH_RequestHandler *rh, "template_contract"); } - if ( (NULL != tp.image) && - (! TMH_image_data_url_valid (tp.image)) ) - { - GNUNET_break_op (0); - GNUNET_JSON_parse_free (spec); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_GENERIC_PARAMETER_MALFORMED, - "image"); - } - /* finally, interact with DB until no serialization error */ for (unsigned int i = 0; i<MAX_RETRIES; i++) { |