FIX: Revoke Permissions

This commit is contained in:
Victor Radael
2022-09-29 18:05:27 -03:00
parent e3c203d673
commit 96a485afd1
5 changed files with 44 additions and 9 deletions
+21
View File
@@ -70,6 +70,27 @@ export class CatalogController {
return { data_asset: JSON.parse(response.data_asset) };
}
@Put('revoke_permissions/:id')
async revokeDataAssetPermissions(
@Param('id') id: string,
@User() user: RequestUser,
@Body() body,
) {
const { customer_id, customer_name, user_id, username } = user;
const metadata = PackTheMetadata({
customer_id,
customer_name,
user_id,
username,
});
const response = await this.catalogService.revokePermissions(
{ ...body, id },
metadata,
);
return { message: response.message };
}
@Get('all')
async catalogAll(@User() user: RequestUser, @Body() body, @Query() params) {
const { user_id, customer_name, customer_id, username } = user;