fix router canceled

This commit is contained in:
hamid zarghami
2026-04-23 12:41:06 +03:30
parent 15ddeb94c7
commit fbbfba8865
@@ -8,14 +8,14 @@ import {
export const getShipmentMethod = async (): Promise<ShipmentMethodsResponse> => { export const getShipmentMethod = async (): Promise<ShipmentMethodsResponse> => {
const { data } = await api.get<ShipmentMethodsResponse>( const { data } = await api.get<ShipmentMethodsResponse>(
"/public/delivery-methods/restaurant" "/public/delivery-methods/restaurant",
); );
return data; return data;
}; };
export const getPaymentMethod = async (): Promise<PaymentMethodsResponse> => { export const getPaymentMethod = async (): Promise<PaymentMethodsResponse> => {
const { data } = await api.get<PaymentMethodsResponse>( const { data } = await api.get<PaymentMethodsResponse>(
"/public/payments/methods/restaurant" "/public/payments/methods/restaurant",
); );
return data; return data;
}; };
@@ -47,7 +47,7 @@ export const createOrder = async (orderData?: {
}): Promise<CreateOrderResponse> => { }): Promise<CreateOrderResponse> => {
const { data } = await api.post<CreateOrderResponse>( const { data } = await api.post<CreateOrderResponse>(
"/public/checkout", "/public/checkout",
orderData orderData,
); );
return data; return data;
}; };
@@ -70,14 +70,14 @@ export const setTableNumber = async (number: number) => {
}; };
export const getOrderDetail = async ( export const getOrderDetail = async (
id: string id: string,
): Promise<OrderDetailResponse> => { ): Promise<OrderDetailResponse> => {
const { data } = await api.get<OrderDetailResponse>(`/public/orders/${id}`); const { data } = await api.get<OrderDetailResponse>(`/public/orders/${id}`);
return data; return data;
}; };
export const cancelOrder = async (id: string) => { export const cancelOrder = async (id: string) => {
const { data } = await api.patch(`/public/orders/${id}/cancel`); const { data } = await api.patch(`/public/orders/${id}/canceled`);
return data; return data;
}; };