diff --git a/backend/src/products/products.controller.ts b/backend/src/products/products.controller.ts index 910856ff..27ec7fe5 100644 --- a/backend/src/products/products.controller.ts +++ b/backend/src/products/products.controller.ts @@ -111,7 +111,7 @@ export class ProductsController { return this.productsService.restore(id); } - @Delete('reset-all') + @Post('reset-all') @HttpCode(200) resetAll() { return this.productsService.resetAll(); diff --git a/frontend/app/admin/products/actions.ts b/frontend/app/admin/products/actions.ts index 13f14609..50765cf5 100644 --- a/frontend/app/admin/products/actions.ts +++ b/frontend/app/admin/products/actions.ts @@ -76,7 +76,7 @@ export async function deleteProduct(id: number) { export async function resetAllProducts() { const res = await fetch(`${API_BASE}/api/products/reset-all`, { - method: 'DELETE', + method: 'POST', headers: { ...(await getAuthHeaders()) }, cache: 'no-store', });