diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-02-05 10:40:38 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-02-05 10:40:38 +0100 |
commit | a24a8eef9e71866f738f88e93d628c881014294b (patch) | |
tree | 6112a8a685a9870978b4c5d175a7e51216969bc4 /src/bank-lib | |
parent | 9d68b422493ac28d60b4dff282f912e43ba573b1 (diff) |
add missing /config endpoints
Diffstat (limited to 'src/bank-lib')
-rw-r--r-- | src/bank-lib/fakebank_tbr.c | 20 | ||||
-rw-r--r-- | src/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 index 94d6ea84f..56681841c 100644 --- 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 index 353821bd2..775bbb58d 100644 --- 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)) { |