FIX: remove permission to delete VPNS

This commit is contained in:
Gabriel Rosa
2022-09-15 09:48:37 -03:00
parent bb61990f6e
commit 5d045b675c
4 changed files with 66 additions and 61 deletions
+19 -19
View File
@@ -103,29 +103,29 @@ export class ConnectionController {
return response;
}
@Delete('/:id')
// @Delete('/:id')
// @RequireAllPermissions(connectionPermissions.DELETE)
async deleteConnection(
@User() user: RequestUser,
@Param('id') id: string,
): Promise<ConnectionRes> {
this.logger.info('/connections - Delete Connection');
// 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(