fix router canceled
This commit is contained in:
@@ -8,14 +8,14 @@ import {
|
||||
|
||||
export const getShipmentMethod = async (): Promise<ShipmentMethodsResponse> => {
|
||||
const { data } = await api.get<ShipmentMethodsResponse>(
|
||||
"/public/delivery-methods/restaurant"
|
||||
"/public/delivery-methods/restaurant",
|
||||
);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const getPaymentMethod = async (): Promise<PaymentMethodsResponse> => {
|
||||
const { data } = await api.get<PaymentMethodsResponse>(
|
||||
"/public/payments/methods/restaurant"
|
||||
"/public/payments/methods/restaurant",
|
||||
);
|
||||
return data;
|
||||
};
|
||||
@@ -47,7 +47,7 @@ export const createOrder = async (orderData?: {
|
||||
}): Promise<CreateOrderResponse> => {
|
||||
const { data } = await api.post<CreateOrderResponse>(
|
||||
"/public/checkout",
|
||||
orderData
|
||||
orderData,
|
||||
);
|
||||
return data;
|
||||
};
|
||||
@@ -70,14 +70,14 @@ export const setTableNumber = async (number: number) => {
|
||||
};
|
||||
|
||||
export const getOrderDetail = async (
|
||||
id: string
|
||||
id: string,
|
||||
): Promise<OrderDetailResponse> => {
|
||||
const { data } = await api.get<OrderDetailResponse>(`/public/orders/${id}`);
|
||||
return data;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user