mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-17 21:59:08 +00:00
FIX: Delete data asset
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user