ugh
This commit is contained in:
@@ -91,7 +91,8 @@ export const updateProductStock = async (
|
||||
authToken: string
|
||||
) => {
|
||||
try {
|
||||
const url = `${process.env.NEXT_PUBLIC_API_URL}/stock/${productId}`;
|
||||
// Use Next.js API proxy to ensure request goes through rewrites
|
||||
const url = `/api/stock/${productId}`;
|
||||
return await fetchData(url, {
|
||||
method: "PUT",
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user