feat: add functionality for managing deleted products, including restoration and permanent deletion
This commit is contained in:
@@ -186,6 +186,18 @@ export class ProductsController {
|
||||
return this.productsService.update(id, body);
|
||||
}
|
||||
|
||||
@Roles('admin')
|
||||
@Get('deleted')
|
||||
findDeleted() {
|
||||
return this.productsService.findDeleted();
|
||||
}
|
||||
|
||||
@Roles('admin')
|
||||
@Delete(':id/permanent')
|
||||
permanentDelete(@Param('id', ParseIntPipe) id: number) {
|
||||
return this.productsService.permanentDelete(id);
|
||||
}
|
||||
|
||||
@Roles('admin')
|
||||
@Delete(':id')
|
||||
remove(@Param('id', ParseIntPipe) id: number) {
|
||||
|
||||
Reference in New Issue
Block a user