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);
|
return this.productsService.restore(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Delete('reset-all')
|
@Post('reset-all')
|
||||||
@HttpCode(200)
|
@HttpCode(200)
|
||||||
resetAll() {
|
resetAll() {
|
||||||
return this.productsService.resetAll();
|
return this.productsService.resetAll();
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ export async function deleteProduct(id: number) {
|
|||||||
|
|
||||||
export async function resetAllProducts() {
|
export async function resetAllProducts() {
|
||||||
const res = await fetch(`${API_BASE}/api/products/reset-all`, {
|
const res = await fetch(`${API_BASE}/api/products/reset-all`, {
|
||||||
method: 'DELETE',
|
method: 'POST',
|
||||||
headers: { ...(await getAuthHeaders()) },
|
headers: { ...(await getAuthHeaders()) },
|
||||||
cache: 'no-store',
|
cache: 'no-store',
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user