feat(products): change reset-all endpoint method from DELETE to POST
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user