aboutsummaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_kyc-check.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-08-19 09:31:51 +0200
committerChristian Grothoff <christian@grothoff.org>2022-08-19 09:31:51 +0200
commit2c4bd1e1d0094b93588a5c35205d54e9eac60f03 (patch)
tree9dbddb18e52d76a254c6dd64e6ecadaf9318b984 /src/exchange/taler-exchange-httpd_kyc-check.c
parent9c1f1c76be598baeb7cc14d4c63e9815ad78d22f (diff)
add user type to kyc-check
Diffstat (limited to 'src/exchange/taler-exchange-httpd_kyc-check.c')
-rw-r--r--src/exchange/taler-exchange-httpd_kyc-check.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/exchange/taler-exchange-httpd_kyc-check.c b/src/exchange/taler-exchange-httpd_kyc-check.c
index 61d1abf8..c4181e11 100644
--- a/src/exchange/taler-exchange-httpd_kyc-check.c
+++ b/src/exchange/taler-exchange-httpd_kyc-check.c
@@ -108,6 +108,11 @@ struct KycPoller
enum TALER_ErrorCode ec;
/**
+ * What kind of entity is doing the KYC check?
+ */
+ enum TALER_KYCLOGIC_KycUserType ut;
+
+ /**
* True if we are still suspended.
*/
bool suspended;
@@ -401,7 +406,7 @@ db_event_cb (void *cls,
MHD_RESULT
TEH_handler_kyc_check (
struct TEH_RequestContext *rc,
- const char *const args[2])
+ const char *const args[3])
{
struct KycPoller *kyp = rc->rh_ctx;
MHD_RESULT res;
@@ -447,6 +452,17 @@ TEH_handler_kyc_check (
"h_payto");
}
+ if (GNUNET_OK !=
+ TALER_KYCLOGIC_kyc_user_type_from_string (args[2],
+ &kyp->ut))
+ {
+ GNUNET_break_op (0);
+ return TALER_MHD_reply_with_error (rc->connection,
+ MHD_HTTP_BAD_REQUEST,
+ TALER_EC_GENERIC_PARAMETER_MALFORMED,
+ "usertype");
+ }
+
{
const char *ts;