mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-03 19:39:07 +00:00
FIX: delete route reimplemented
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user