From e92440e257b4df4a232a28701143a4f9db730458 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 8 Mar 2024 15:36:50 -0300 Subject: fix #8489 --- packages/taler-util/src/http-client/bank-core.ts | 48 ++++++++++-------------- 1 file changed, 20 insertions(+), 28 deletions(-) (limited to 'packages/taler-util/src/http-client/bank-core.ts') diff --git a/packages/taler-util/src/http-client/bank-core.ts b/packages/taler-util/src/http-client/bank-core.ts index 4131edb11..b9fd6da80 100644 --- a/packages/taler-util/src/http-client/bank-core.ts +++ b/packages/taler-util/src/http-client/bank-core.ts @@ -86,16 +86,16 @@ export enum TalerCoreBankCacheEviction { CREATE_WITHDRAWAL, CREATE_CASHOUT, } - /** - * Protocol version spoken with the core bank. - * - * Endpoint must be ordered in the same way that in the docs - * Response code (http and taler) must have the same order that in the docs - * That way is easier to see changes - * - * Uses libtool's current:revision:age versioning. - */ - export class TalerCoreBankHttpClient { +/** + * Protocol version spoken with the core bank. + * + * Endpoint must be ordered in the same way that in the docs + * Response code (http and taler) must have the same order that in the docs + * That way is easier to see changes + * + * Uses libtool's current:revision:age versioning. + */ +export class TalerCoreBankHttpClient { public readonly PROTOCOL_VERSION = "4:0:0"; httpLib: HttpRequestLibrary; @@ -960,47 +960,39 @@ export enum TalerCoreBankCacheEviction { * https://docs.taler.net/core/api-corebank.html#taler-bank-integration-api * */ - getIntegrationAPI(): string { - return new URL(`taler-integration/`, this.baseUrl).href; - // return new TalerBankIntegrationHttpClient(url.href, this.httpLib); + getIntegrationAPI(): URL { + return new URL(`taler-integration/`, this.baseUrl); } /** * https://docs.taler.net/core/api-corebank.html#taler-bank-integration-api * */ - getWireGatewayAPI(username: string): string { - return new URL( - `accounts/${username}/taler-wire-gateway/`, - this.baseUrl, - ).href; - // return new TalerWireGatewayHttpClient(url.href, username, this.httpLib); + getWireGatewayAPI(username: string): URL { + return new URL(`accounts/${username}/taler-wire-gateway/`, this.baseUrl); } /** * https://docs.taler.net/core/api-corebank.html#taler-bank-integration-api * */ - getRevenueAPI(username: string): string { - return new URL(`accounts/${username}/taler-revenue/`, this.baseUrl).href; - // return new TalerRevenueHttpClient(url.href, username, this.httpLib); + getRevenueAPI(username: string): URL { + return new URL(`accounts/${username}/taler-revenue/`, this.baseUrl); } /** * https://docs.taler.net/core/api-corebank.html#post--accounts-$USERNAME-token * */ - getAuthenticationAPI(username: string): string { - return new URL(`accounts/${username}/`, this.baseUrl).href; - // return new TalerAuthenticationHttpClient(url.href, username, this.httpLib); + getAuthenticationAPI(username: string): URL { + return new URL(`accounts/${username}/`, this.baseUrl); } /** * https://docs.taler.net/core/api-corebank.html#post--accounts-$USERNAME-token * */ - getConversionInfoAPI(): string { - return new URL(`conversion-info/`, this.baseUrl).href; - // TalerBankConversionHttpClient + getConversionInfoAPI(): URL { + return new URL(`conversion-info/`, this.baseUrl); } } -- cgit v1.2.3