From 0e8e0206616c7a7c5666d6cd39245e415e2ae925 Mon Sep 17 00:00:00 2001 From: afkzoro Date: Thu, 24 Oct 2024 14:57:36 +0100 Subject: [PATCH 1/3] fix: endpoints returning status code 500 --- apps/admin-gateway/src/module.api/orders.controller.ts | 2 +- apps/admin-gateway/src/module.api/payment.controller.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/admin-gateway/src/module.api/orders.controller.ts b/apps/admin-gateway/src/module.api/orders.controller.ts index b5c6f57c..58f8510c 100644 --- a/apps/admin-gateway/src/module.api/orders.controller.ts +++ b/apps/admin-gateway/src/module.api/orders.controller.ts @@ -124,7 +124,7 @@ export class OrdersController { streamUpdates: true } return await lastValueFrom( - this.ordersClient.send(QUEUE_MESSAGE.UPDATE_ORDER_STATUS, payload).pipe( + this.ordersClient.emit(QUEUE_MESSAGE.UPDATE_ORDER_STATUS, payload).pipe( catchError((error: IRpcException) => { throw new HttpException(error.message, error.status) }) diff --git a/apps/admin-gateway/src/module.api/payment.controller.ts b/apps/admin-gateway/src/module.api/payment.controller.ts index 154fcd3f..0d188a58 100644 --- a/apps/admin-gateway/src/module.api/payment.controller.ts +++ b/apps/admin-gateway/src/module.api/payment.controller.ts @@ -55,7 +55,7 @@ export class PaymentController { data: undefined } return await lastValueFrom( - this.paymentClient.send(QUEUE_MESSAGE.WALLET_UPDATE_PAYOUT, payload).pipe( + this.paymentClient.emit(QUEUE_MESSAGE.WALLET_UPDATE_PAYOUT, payload).pipe( catchError((error: IRpcException) => { throw new HttpException(error.message, error.status) }) From a2a552f824d9a1c6778908ee1faec575d286af06 Mon Sep 17 00:00:00 2001 From: afkzoro Date: Sun, 27 Oct 2024 18:42:07 +0100 Subject: [PATCH 2/3] fix: update clientproxy to send method --- apps/admin-gateway/src/module.api/orders.controller.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/admin-gateway/src/module.api/orders.controller.ts b/apps/admin-gateway/src/module.api/orders.controller.ts index 58f8510c..1e2fdccc 100644 --- a/apps/admin-gateway/src/module.api/orders.controller.ts +++ b/apps/admin-gateway/src/module.api/orders.controller.ts @@ -123,8 +123,9 @@ export class OrdersController { ...data, streamUpdates: true } + console.log(payload) return await lastValueFrom( - this.ordersClient.emit(QUEUE_MESSAGE.UPDATE_ORDER_STATUS, payload).pipe( + this.ordersClient.send(QUEUE_MESSAGE.UPDATE_ORDER_STATUS, payload).pipe( catchError((error: IRpcException) => { throw new HttpException(error.message, error.status) }) From 35191768095788a0ca03616e46144625dbbbed0e Mon Sep 17 00:00:00 2001 From: afkzoro Date: Sun, 27 Oct 2024 18:44:39 +0100 Subject: [PATCH 3/3] remove console log --- apps/admin-gateway/src/module.api/orders.controller.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/admin-gateway/src/module.api/orders.controller.ts b/apps/admin-gateway/src/module.api/orders.controller.ts index 1e2fdccc..b5c6f57c 100644 --- a/apps/admin-gateway/src/module.api/orders.controller.ts +++ b/apps/admin-gateway/src/module.api/orders.controller.ts @@ -123,7 +123,6 @@ export class OrdersController { ...data, streamUpdates: true } - console.log(payload) return await lastValueFrom( this.ordersClient.send(QUEUE_MESSAGE.UPDATE_ORDER_STATUS, payload).pipe( catchError((error: IRpcException) => {