From ddedf03a816e5139b235a3ebdf5b600508c5ed5f Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Mon, 26 Jun 2023 00:01:31 +0200 Subject: [age-withdraw] age-withdraw commit- and reveal-handlers implemented, 12/n The handlers for the commit- and reveal-phases of the age-withdraw HTTP-endpoints are implemented, yet not active. Still missing: - support for age-withdraw is missing in lib/. - tests --- src/exchange/taler-exchange-httpd_responses.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/exchange/taler-exchange-httpd_responses.c') diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c index 835a47713..d1636a0af 100644 --- a/src/exchange/taler-exchange-httpd_responses.c +++ b/src/exchange/taler-exchange-httpd_responses.c @@ -1084,6 +1084,20 @@ TEH_RESPONSE_reply_reserve_insufficient_balance ( } +MHD_RESULT +TEH_RESPONSE_reply_reserve_age_restriction_required ( + struct MHD_Connection *connection, + uint16_t maximum_allowed_age) +{ + return TALER_MHD_REPLY_JSON_PACK ( + connection, + MHD_HTTP_BAD_REQUEST, + TALER_JSON_pack_ec (TALER_EC_EXCHANGE_RESERVES_AGE_RESTRICTION_REQUIRED), + GNUNET_JSON_pack_uint64 ("maximum_allowed_age", + maximum_allowed_age)); +} + + MHD_RESULT TEH_RESPONSE_reply_purse_created ( struct MHD_Connection *connection, -- cgit v1.2.3