summaryrefslogtreecommitdiff
path: root/src/bank-lib/bank_api_admin.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-05-04 18:35:53 +0200
committerChristian Grothoff <christian@grothoff.org>2017-05-04 18:35:53 +0200
commitf4df63e448c9bcd990ec9a41eb6cb19a36246099 (patch)
treec53f8f31dfc346b416cbfeb43a715b4060e19bc3 /src/bank-lib/bank_api_admin.c
parent234dbcc7b71ac98e7f63393e454377d1e2ae11c7 (diff)
downloadexchange-f4df63e448c9bcd990ec9a41eb6cb19a36246099.tar.gz
exchange-f4df63e448c9bcd990ec9a41eb6cb19a36246099.tar.bz2
exchange-f4df63e448c9bcd990ec9a41eb6cb19a36246099.zip
adding support for transaction history to wire plugin API (#4959)
Diffstat (limited to 'src/bank-lib/bank_api_admin.c')
-rw-r--r--src/bank-lib/bank_api_admin.c32
1 files changed, 2 insertions, 30 deletions
diff --git a/src/bank-lib/bank_api_admin.c b/src/bank-lib/bank_api_admin.c
index 213cd08b3..375d2ab55 100644
--- a/src/bank-lib/bank_api_admin.c
+++ b/src/bank-lib/bank_api_admin.c
@@ -64,34 +64,6 @@ struct TALER_BANK_AdminAddIncomingHandle
};
-
-/**
- * Obtain the URL to use for an API request.
- *
- * @param u base URL of the bank
- * @param path Taler API path (i.e. "/reserve/withdraw")
- * @return the full URI to use with cURL
- */
-static char *
-path_to_url (const char *u,
- const char *path)
-{
- char *url;
-
- if ( ('/' == path[0]) &&
- (0 < strlen (u)) &&
- ('/' == u[strlen (u) - 1]) )
- path++; /* avoid generating URL with "//" from concat */
- GNUNET_asprintf (&url,
- "%s%s",
- u,
- path);
- return url;
-}
-
-
-
-
/**
* Function called when we're done processing the
* HTTP /admin/add/incoming request.
@@ -195,8 +167,8 @@ TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx,
aai = GNUNET_new (struct TALER_BANK_AdminAddIncomingHandle);
aai->cb = res_cb;
aai->cb_cls = res_cb_cls;
- aai->request_url = path_to_url (bank_base_url,
- "/admin/add/incoming");
+ aai->request_url = TALER_BANK_path_to_url_ (bank_base_url,
+ "/admin/add/incoming");
aai->authh = TALER_BANK_make_auth_header_ (auth);
eh = curl_easy_init ();
GNUNET_assert (NULL != (aai->json_enc =