merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit eeb9989d16a8e5039cb4e47c41161626410576d6
parent 87e2fd4694fdcd01749400700b747151a327543d
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 21 Feb 2026 23:15:49 +0100

implement max_age filter for GET /private/orders (#11127)

Diffstat:
Msrc/backend/taler-merchant-httpd_private-get-orders.c | 15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_private-get-orders.c b/src/backend/taler-merchant-httpd_private-get-orders.c @@ -1394,6 +1394,21 @@ TMH_private_get_orders (const struct TMH_RequestHandler *rh, } } if (po->of.delta > 0) + { + struct GNUNET_TIME_Relative duration + = GNUNET_TIME_UNIT_FOREVER_REL; + struct GNUNET_TIME_Absolute cut_off; + + TALER_MHD_parse_request_rel_time (connection, + "max_age", + &duration); + cut_off = GNUNET_TIME_absolute_subtract (GNUNET_TIME_absolute_get (), + duration); + po->of.date = GNUNET_TIME_timestamp_max ( + po->of.date, + GNUNET_TIME_absolute_to_timestamp (cut_off)); + } + if (po->of.delta > 0) po->of.start_row = 0; else po->of.start_row = INT64_MAX;