feat: add functionality for managing deleted products, including restoration and permanent deletion

This commit is contained in:
Nils-Johan Gynther
2026-04-21 13:30:44 +02:00
parent 4074b850cb
commit 87eab4d0ca
7 changed files with 323 additions and 22 deletions
@@ -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) {