summaryrefslogtreecommitdiff
path: root/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c')
-rw-r--r--src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c b/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c
index 799d47a87..cad7f0b43 100644
--- a/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c
+++ b/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c
@@ -110,18 +110,28 @@ TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_get (struct
ja = json_array ();
GNUNET_break (NULL != ja);
- uint64_t row_id = 0;
- bool return_suppressed;
+ int64_t limit = -20;
+ uint64_t offset;
- struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_uint64 ("row_id",
- &row_id),
+ TALER_MHD_parse_request_snumber (connection,
+ "limit",
+ &limit);
- GNUNET_JSON_spec_bool ("return_suppressed",
- &return_suppressed),
+ if (limit < 0)
+ offset = INT64_MAX;
+ else
+ offset = 0;
- GNUNET_JSON_spec_end ()
- };
+ 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
@@ -156,7 +166,8 @@ TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_get (struct
qs = TAH_plugin->get_reserve_balance_insufficient_inconsistency (
TAH_plugin->cls,
- row_id,
+ limit,
+ offset,
return_suppressed,
&process_reserve_balance_insufficient_inconsistency,
ja);