From b311a84bde838ef5b20052a809a52ef039d24b41 Mon Sep 17 00:00:00 2001 From: Gabriel Rosa Date: Tue, 4 Oct 2022 15:22:43 -0300 Subject: [PATCH] FIX: delete route reimplemented --- .../connection/connection.controller.ts | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/modules/connection/connection.controller.ts b/src/modules/connection/connection.controller.ts index a86904c..1d614bd 100644 --- a/src/modules/connection/connection.controller.ts +++ b/src/modules/connection/connection.controller.ts @@ -105,29 +105,29 @@ export class ConnectionController { return response; } - // @Delete('/:id') - // @RequireAllPermissions(connectionPermissions.DELETE) - // async deleteConnection( - // @User() user: RequestUser, - // @Param('id') id: string, - // ): Promise { - // this.logger.info('/connections - Delete Connection'); + @Delete('/:id') + @RequireAllPermissions(connectionPermissions.DELETE) + async deleteConnection( + @User() user: RequestUser, + @Param('id') id: string, + ): Promise { + this.logger.info('/connections - Delete Connection'); - // const { user_id, customer_id, customer_name, username } = user; - // const metadata = PackTheMetadata({ - // user_id, - // customer_id, - // customer_name, - // username, - // }); + const { user_id, customer_id, customer_name, username } = user; + const metadata = PackTheMetadata({ + user_id, + customer_id, + customer_name, + username, + }); - // const response: any = await this.clientService.deleteConnection({ - // body: { id }, - // metadata, - // }); + const response: any = await this.clientService.deleteConnection({ + body: { id }, + metadata, + }); - // return response; - // } + return response; + } @Get() async getAllConnections(