summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Zwahlen <cedric.zwahlen@students.bfh.ch>2024-04-17 13:11:35 +0200
committerCedric Zwahlen <cedric.zwahlen@students.bfh.ch>2024-04-17 13:11:35 +0200
commit859091bb26b403cd4a49fcabe12c837bc5cdf00a (patch)
tree307b33ebb8681c215e25728b1f31336579a7b971
parent3b055c24839c59268936caa4caaa08b9c10dcad1 (diff)
downloadexchange-859091bb26b403cd4a49fcabe12c837bc5cdf00a.tar.gz
exchange-859091bb26b403cd4a49fcabe12c837bc5cdf00a.tar.bz2
exchange-859091bb26b403cd4a49fcabe12c837bc5cdf00a.zip
Fix various CRUD bugs
-rw-r--r--src/auditor/taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-get.c74
1 files changed, 23 insertions, 51 deletions
diff --git a/src/auditor/taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-get.c b/src/auditor/taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-get.c
index c1db6627c..6b7ab2a2f 100644
--- a/src/auditor/taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-get.c
+++ b/src/auditor/taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-get.c
@@ -107,60 +107,32 @@ TAH_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_handler_get (struct
}
ja = json_array ();
GNUNET_break (NULL != ja);
- int64_t limit = -20;
- uint64_t offset;
-
- TALER_MHD_parse_request_snumber (connection,
- "limit",
- &limit);
-
- if (limit < 0)
- offset = INT64_MAX;
- else
- offset = 0;
-
- TALER_MHD_parse_request_number (connection,
- "offset",
- &offset);
-
- bool return_suppressed = false;
-
- struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_bool ("return_suppressed", &return_suppressed),
- GNUNET_JSON_spec_end ()
- };
-
-
- // read the input json
- json_t *json_in;
+ int64_t limit = -20;
+ uint64_t offset;
+
+ TALER_MHD_parse_request_snumber (connection,
+ "limit",
+ &limit);
+
+ if (limit < 0)
+ offset = INT64_MAX;
+ else
+ offset = 0;
+
+ TALER_MHD_parse_request_number (connection,
+ "offset",
+ &offset);
+
+ bool return_suppressed = false;
+ const char *ret_s = MHD_lookup_connection_value (connection,
+ MHD_GET_ARGUMENT_KIND,
+ "return_suppressed");
+ if (ret_s != NULL && strcmp (ret_s, "true") == 0)
{
- enum GNUNET_GenericReturnValue res;
-
- res = TALER_MHD_parse_post_json (connection,
- connection_cls,
- upload_data,
- upload_data_size,
- &json_in);
- if (GNUNET_SYSERR == res)
- return MHD_NO;
- if ((GNUNET_NO == res) ||
- (NULL == json_in))
- return MHD_YES;
- res = TALER_MHD_parse_json_data (connection,
- json_in,
- spec);
- if (GNUNET_SYSERR == res)
- {
- json_decref (json_in);
- return MHD_NO; /* hard failure */
- }
- if (GNUNET_NO == res)
- {
- json_decref (json_in);
- return MHD_YES; /* failure */
- }
+ return_suppressed = true;
}
+
qs = TAH_plugin->get_denomination_key_validity_withdraw_inconsistency (
TAH_plugin->cls,
limit,