exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit a24a8eef9e71866f738f88e93d628c881014294b
parent 9d68b422493ac28d60b4dff282f912e43ba573b1
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon,  5 Feb 2024 10:40:38 +0100

add missing /config endpoints

Diffstat:
Msrc/bank-lib/fakebank_tbr.c | 20++++++++++++++++++++
Msrc/bank-lib/fakebank_twg.c | 18++++++++++++++++++
2 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/src/bank-lib/fakebank_tbr.c b/src/bank-lib/fakebank_tbr.c @@ -46,6 +46,26 @@ TALER_FAKEBANK_tbr_main_ ( "Fakebank - Anastasis API: serving URL `%s' for account `%s'\n", url, account); + + if ( (0 == strcmp (url, + "/config")) && + (0 == strcasecmp (method, + MHD_HTTP_METHOD_GET)) ) + { + /* GET /config */ + return TALER_MHD_REPLY_JSON_PACK ( + connection, + MHD_HTTP_OK, + GNUNET_JSON_pack_string ("version", + "0:0:0"), + GNUNET_JSON_pack_string ("currency", + h->currency), + GNUNET_JSON_pack_string ("implementation", + "urn:net:taler:specs:bank:fakebank"), + GNUNET_JSON_pack_string ("name", + "taler-revenue")); + } + if (0 == strcasecmp (method, MHD_HTTP_METHOD_GET)) { diff --git a/src/bank-lib/fakebank_twg.c b/src/bank-lib/fakebank_twg.c @@ -49,6 +49,24 @@ TALER_FAKEBANK_twg_main_ ( "Fakebank TWG, serving URL `%s' for account `%s'\n", url, account); + if ( (0 == strcmp (url, + "/config")) && + (0 == strcasecmp (method, + MHD_HTTP_METHOD_GET)) ) + { + /* GET /config */ + return TALER_MHD_REPLY_JSON_PACK ( + connection, + MHD_HTTP_OK, + GNUNET_JSON_pack_string ("version", + "0:0:0"), + GNUNET_JSON_pack_string ("currency", + h->currency), + GNUNET_JSON_pack_string ("implementation", + "urn:net:taler:specs:bank:fakebank"), + GNUNET_JSON_pack_string ("name", + "taler-wire-gateway")); + } if (0 == strcasecmp (method, MHD_HTTP_METHOD_GET)) {