FIX: Manage Permissions Catalog

This commit is contained in:
Victor Radael
2022-09-28 16:58:52 -03:00
parent a28781423c
commit d42584fcfc
5 changed files with 37 additions and 25 deletions
+13 -2
View File
@@ -55,8 +55,19 @@ export class CatalogController {
@User() user: RequestUser,
@Body() body,
) {
const response = await this.catalogService.managePermissions(body, user);
return { message: { id, 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.managePermissions(
{ ...body, id },
metadata,
);
return { data_asset: JSON.parse(response.data_asset) };
}
@Get('all')