aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-06-05 20:06:36 +0200
committerChristian Grothoff <christian@grothoff.org>2024-06-05 20:06:36 +0200
commit7f10f370e2a3c64e49aaa262497a5a7da20c2db6 (patch)
treed740ab134066aaa0c6b52439b3f64c0c0c70417c /src/backend
parent319888a23889cda7db2952fb96780c682fbd2950 (diff)
remove legacy user_type
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c2
-rw-r--r--src/backend/taler-merchant-httpd_private-get-instances-ID.c2
-rw-r--r--src/backend/taler-merchant-httpd_private-get-instances.c2
-rw-r--r--src/backend/taler-merchant-httpd_private-patch-instances-ID.c20
-rw-r--r--src/backend/taler-merchant-httpd_private-post-instances.c14
5 files changed, 3 insertions, 37 deletions
diff --git a/src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c b/src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c
index 8a338e7d..0382b742 100644
--- a/src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c
+++ b/src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c
@@ -684,7 +684,7 @@ kyc_with_exchange (void *cls,
keys,
ekr->exchange_kyc_serial,
&h_payto,
- ekr->kc->mi->settings.ut,
+ 1, /* FIXME: this will go away! */
GNUNET_TIME_absolute_get_remaining (kc->timeout),
&exchange_check_cb,
ekr);
diff --git a/src/backend/taler-merchant-httpd_private-get-instances-ID.c b/src/backend/taler-merchant-httpd_private-get-instances-ID.c
index adc99c39..c8cd2c12 100644
--- a/src/backend/taler-merchant-httpd_private-get-instances-ID.c
+++ b/src/backend/taler-merchant-httpd_private-get-instances-ID.c
@@ -79,7 +79,7 @@ get_instances_ID (struct TMH_MerchantInstance *mi,
mi->settings.name),
GNUNET_JSON_pack_string (
"user_type",
- TALER_KYCLOGIC_kyc_user_type2s (mi->settings.ut)),
+ "business"),
GNUNET_JSON_pack_allow_null (
GNUNET_JSON_pack_string ("website",
mi->settings.website)),
diff --git a/src/backend/taler-merchant-httpd_private-get-instances.c b/src/backend/taler-merchant-httpd_private-get-instances.c
index 50b5c0c2..0220d4df 100644
--- a/src/backend/taler-merchant-httpd_private-get-instances.c
+++ b/src/backend/taler-merchant-httpd_private-get-instances.c
@@ -76,7 +76,7 @@ add_instance (void *cls,
mi->settings.name),
GNUNET_JSON_pack_string (
"user_type",
- TALER_KYCLOGIC_kyc_user_type2s (mi->settings.ut)),
+ "business"),
GNUNET_JSON_pack_allow_null (
GNUNET_JSON_pack_string ("website",
mi->settings.website)),
diff --git a/src/backend/taler-merchant-httpd_private-patch-instances-ID.c b/src/backend/taler-merchant-httpd_private-patch-instances-ID.c
index 027d5869..70df009e 100644
--- a/src/backend/taler-merchant-httpd_private-patch-instances-ID.c
+++ b/src/backend/taler-merchant-httpd_private-patch-instances-ID.c
@@ -64,17 +64,12 @@ patch_instances_ID (struct TMH_MerchantInstance *mi,
{
struct TALER_MERCHANTDB_InstanceSettings is;
const char *name;
- const char *uts = "business";
struct TMH_WireMethod *wm_head = NULL;
struct TMH_WireMethod *wm_tail = NULL;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_string ("name",
&name),
GNUNET_JSON_spec_mark_optional (
- GNUNET_JSON_spec_string ("user_type",
- &uts),
- NULL),
- GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("website",
(const char **) &is.website),
NULL),
@@ -115,19 +110,6 @@ patch_instances_ID (struct TMH_MerchantInstance *mi,
? MHD_YES
: MHD_NO;
}
- if (NULL == uts)
- uts = "business";
- if (GNUNET_OK !=
- TALER_KYCLOGIC_kyc_user_type_from_string (uts,
- &is.ut))
- {
- 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,
- "user_type");
- }
if (! TMH_location_object_valid (is.address))
{
GNUNET_break_op (0);
@@ -185,7 +167,6 @@ patch_instances_ID (struct TMH_MerchantInstance *mi,
/* Check for equality of settings */
if (! ( (0 == strcmp (mi->settings.name,
name)) &&
- (mi->settings.ut == is.ut) &&
((mi->settings.email == is.email) ||
(NULL != is.email && NULL != mi->settings.email &&
0 == strcmp (mi->settings.email,
@@ -240,7 +221,6 @@ giveup:
json_decref (mi->settings.jurisdiction);
is.id = mi->settings.id;
mi->settings = is;
- // mi->settings.user_type = (enum TALER_KYCLOGIC_KycUserType) is.user_type;
mi->settings.address = json_incref (mi->settings.address);
mi->settings.jurisdiction = json_incref (mi->settings.jurisdiction);
mi->settings.name = GNUNET_strdup (name);
diff --git a/src/backend/taler-merchant-httpd_private-post-instances.c b/src/backend/taler-merchant-httpd_private-post-instances.c
index a4cf884d..f56e7098 100644
--- a/src/backend/taler-merchant-httpd_private-post-instances.c
+++ b/src/backend/taler-merchant-httpd_private-post-instances.c
@@ -103,20 +103,6 @@ TMH_private_post_instances (const struct TMH_RequestHandler *rh,
? MHD_YES
: MHD_NO;
}
- if (NULL == uts)
- uts = "business";
- if (GNUNET_OK !=
- TALER_KYCLOGIC_kyc_user_type_from_string (uts,
- &is.ut))
- {
- 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,
- "user_type");
- }
-
{
enum GNUNET_GenericReturnValue ret;