Update page.tsx
This commit is contained in:
@@ -262,8 +262,10 @@ export default function OrderDetailsPage() {
|
||||
try {
|
||||
setIsCancelling(true);
|
||||
const authToken = document.cookie.split("Authorization=")[1];
|
||||
|
||||
// Update to match the correct API endpoint structure
|
||||
const response = await fetchData(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/orders/${orderId}`,
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/orders/${orderId}/status`,
|
||||
{
|
||||
method: "PUT",
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user