diff options
Diffstat (limited to 'src/auditor/taler-auditor-httpd_fee-time-inconsistency-get.c')
-rw-r--r-- | src/auditor/taler-auditor-httpd_fee-time-inconsistency-get.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/auditor/taler-auditor-httpd_fee-time-inconsistency-get.c b/src/auditor/taler-auditor-httpd_fee-time-inconsistency-get.c index ea01dfd45..e0a368035 100644 --- a/src/auditor/taler-auditor-httpd_fee-time-inconsistency-get.c +++ b/src/auditor/taler-auditor-httpd_fee-time-inconsistency-get.c @@ -100,19 +100,28 @@ TAH_FEE_TIME_INCONSISTENCY_handler_get (struct TAH_RequestHandler *rh, 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 json_t *json_in; @@ -146,7 +155,8 @@ TAH_FEE_TIME_INCONSISTENCY_handler_get (struct TAH_RequestHandler *rh, qs = TAH_plugin->get_fee_time_inconsistency ( TAH_plugin->cls, - row_id, + limit, + offset, return_suppressed, &add_fee_time_inconsistency, ja); |