summaryrefslogtreecommitdiff
path: root/packages/taler-util/src/http-client/exchange.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-util/src/http-client/exchange.ts')
-rw-r--r--packages/taler-util/src/http-client/exchange.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/taler-util/src/http-client/exchange.ts b/packages/taler-util/src/http-client/exchange.ts
index 003410ddb..c61ba1f8d 100644
--- a/packages/taler-util/src/http-client/exchange.ts
+++ b/packages/taler-util/src/http-client/exchange.ts
@@ -9,7 +9,7 @@ import {
opEmptySuccess,
opFixedSuccess,
opKnownHttpFailure,
- opSuccess,
+ opSuccessFromHttp,
opUnknownFailure,
} from "../operation.js";
import {
@@ -70,7 +70,7 @@ export class TalerExchangeHttpClient {
});
switch (resp.status) {
case HttpStatusCode.Ok:
- return opSuccess(resp, codecForExchangeConfig());
+ return opSuccessFromHttp(resp, codecForExchangeConfig());
default:
return opUnknownFailure(resp, await resp.text());
}
@@ -87,7 +87,7 @@ export class TalerExchangeHttpClient {
});
switch (resp.status) {
case HttpStatusCode.Ok:
- return opSuccess(resp, codecForExchangeKeys());
+ return opSuccessFromHttp(resp, codecForExchangeKeys());
default:
return opUnknownFailure(resp, await resp.text());
}
@@ -123,9 +123,9 @@ export class TalerExchangeHttpClient {
switch (resp.status) {
case HttpStatusCode.Ok:
- return opSuccess(resp, codecForAmlRecords());
+ return opSuccessFromHttp(resp, codecForAmlRecords());
case HttpStatusCode.NoContent:
- return opFixedSuccess(resp, { records: [] });
+ return opFixedSuccess({ records: [] });
//this should be unauthorized
case HttpStatusCode.Forbidden:
return opKnownHttpFailure(resp.status, resp);
@@ -156,9 +156,9 @@ export class TalerExchangeHttpClient {
switch (resp.status) {
case HttpStatusCode.Ok:
- return opSuccess(resp, codecForAmlDecisionDetails());
+ return opSuccessFromHttp(resp, codecForAmlDecisionDetails());
case HttpStatusCode.NoContent:
- return opFixedSuccess(resp, { aml_history: [], kyc_attributes: [] });
+ return opFixedSuccess({ aml_history: [], kyc_attributes: [] });
//this should be unauthorized
case HttpStatusCode.Forbidden:
return opKnownHttpFailure(resp.status, resp);