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