FIX: delete route reimplemented

This commit is contained in:
Gabriel Rosa
2022-10-04 15:22:43 -03:00
parent 28280dca8d
commit b311a84bde
+20 -20
View File
@@ -105,29 +105,29 @@ export class ConnectionController {
return response;
}
// @Delete('/:id')
// @RequireAllPermissions(connectionPermissions.DELETE)
// async deleteConnection(
// @User() user: RequestUser,
// @Param('id') id: string,
// ): Promise<ConnectionRes> {
// this.logger.info('/connections - Delete Connection');
@Delete('/:id')
@RequireAllPermissions(connectionPermissions.DELETE)
async deleteConnection(
@User() user: RequestUser,
@Param('id') id: string,
): Promise<ConnectionRes> {
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(