FIX: Delete data asset

This commit is contained in:
Victor Radael
2022-10-26 14:22:29 -03:00
parent b64619ede1
commit dfa6222538
3 changed files with 36 additions and 1 deletions
+22
View File
@@ -454,6 +454,28 @@ export class CatalogController {
return response;
}
@Delete('data-asset/:id')
async deleteDataAsset(
@Param('id') data_asset_id: string,
@User() user: RequestUser,
) {
const { customer_id, customer_name, user_id, username } = user;
const metadata = PackTheMetadata({
customer_id,
customer_name,
user_id,
username,
});
const [type, id] = data_asset_id.split('-');
const response = await this.catalogService.deleteDataAsset(
{ id, type },
metadata,
);
return response;
}
@Delete('data-asset/:id/comment')
async deleteComment(
@Param('id') id: string,