Browse Source

fix(api-gateway): remove duplicating req/res objects on return raw response from payments

Karol Sójko 1 year ago
parent
commit
79d71ca161
1 changed files with 2 additions and 5 deletions
  1. 2 5
      packages/api-gateway/src/Service/Http/HttpServiceProxy.ts

+ 2 - 5
packages/api-gateway/src/Service/Http/HttpServiceProxy.ts

@@ -138,13 +138,10 @@ export class HttpServiceProxy implements ServiceProxyInterface {
       return
     }
 
-    const requestDuplicate = Object.assign({}, request)
-    const responseDuplicate = Object.assign({}, response)
-
     const rawResponse = await this.callServerWithLegacyFormat(
       this.paymentsServerUrl,
-      returnRawResponse ? requestDuplicate : request,
-      returnRawResponse ? responseDuplicate : response,
+      request,
+      response,
       endpointOrMethodIdentifier,
       payload,
       returnRawResponse,