diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-04-16 23:40:19 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-04-16 23:40:19 +0200 |
commit | 4087bfb43d20c2e7ffb553ce3823f497b307647d (patch) | |
tree | c41960090878e1bd7566594ddefee9e3382433a1 /src/backend/taler-merchant-httpd_private-patch-products-ID.c | |
parent | 778176a664c9ecf96073ffbc2e1823a4366fd37a (diff) |
add missing currency check, fix test to use string for image
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-patch-products-ID.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-patch-products-ID.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/backend/taler-merchant-httpd_private-patch-products-ID.c b/src/backend/taler-merchant-httpd_private-patch-products-ID.c index d1ae5c7d..8f7f6243 100644 --- a/src/backend/taler-merchant-httpd_private-patch-products-ID.c +++ b/src/backend/taler-merchant-httpd_private-patch-products-ID.c @@ -151,6 +151,17 @@ TMH_private_patch_products_ID (const struct TMH_RequestHandler *rh, ? MHD_YES : MHD_NO; } + if (0 != + strcasecmp (pd.price.currency, + TMH_currency)) + { + GNUNET_break_op (0); + GNUNET_JSON_parse_free (spec); + return TALER_MHD_reply_with_error (connection, + MHD_HTTP_CONFLICT, + TALER_EC_GENERIC_CURRENCY_MISMATCH, + NULL); + } if (-1 == total_stock) pd.total_stock = UINT64_MAX; else |