summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-07-24 09:12:52 +0200
committerChristian Grothoff <christian@grothoff.org>2021-07-24 09:12:52 +0200
commitfb23045fe1d062cd4f26f3265ac94ded47660abd (patch)
treeb2c4f905f989aaca17830d18a1f7616753800993 /src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c
parentf9fc9f73df9eb5544882815abe0afe8d789a4ef6 (diff)
downloadmerchant-fb23045fe1d062cd4f26f3265ac94ded47660abd.tar.gz
merchant-fb23045fe1d062cd4f26f3265ac94ded47660abd.tar.bz2
merchant-fb23045fe1d062cd4f26f3265ac94ded47660abd.zip
implement #6939 transformation
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c')
-rw-r--r--src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c b/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c
index 73afdfba..f49b9b1d 100644
--- a/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c
+++ b/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c
@@ -51,9 +51,13 @@ authorize_tip (const struct TMH_RequestHandler *rh,
struct TALER_Amount amount;
{
struct GNUNET_JSON_Specification spec[] = {
- TALER_JSON_spec_amount ("amount", &amount),
- GNUNET_JSON_spec_string ("justification", &justification),
- GNUNET_JSON_spec_string ("next_url", &next_url),
+ TALER_JSON_spec_amount ("amount",
+ TMH_currency,
+ &amount),
+ GNUNET_JSON_spec_string ("justification",
+ &justification),
+ GNUNET_JSON_spec_string ("next_url",
+ &next_url),
GNUNET_JSON_spec_end ()
};
enum GNUNET_GenericReturnValue res;
@@ -69,18 +73,6 @@ authorize_tip (const struct TMH_RequestHandler *rh,
: MHD_NO;
}
}
-
- if (0 !=
- strcasecmp (amount.currency,
- TMH_currency))
- {
- GNUNET_break_op (0);
- return TALER_MHD_reply_with_error (connection,
- MHD_HTTP_CONFLICT,
- TALER_EC_GENERIC_CURRENCY_MISMATCH,
- TMH_currency);
- }
-
TMH_db->preflight (TMH_db->cls);
ec = TMH_db->authorize_tip (TMH_db->cls,
hc->instance->settings.id,