diff --git a/app/dashboard/orders/[id]/page.tsx b/app/dashboard/orders/[id]/page.tsx index 409d3ea..72d747b 100644 --- a/app/dashboard/orders/[id]/page.tsx +++ b/app/dashboard/orders/[id]/page.tsx @@ -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: {