From 0f4f4c022970f3aeef6e44f4e70926ae177e1479 Mon Sep 17 00:00:00 2001 From: NotII <46204250+NotII@users.noreply.github.com> Date: Thu, 6 Mar 2025 23:23:42 +0000 Subject: [PATCH] Update page.tsx --- app/dashboard/orders/[id]/page.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: {