Update page.tsx

This commit is contained in:
NotII
2025-03-06 23:23:42 +00:00
parent c350294b84
commit 0f4f4c0229

View File

@@ -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: {