detail of order
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import axios from "@/config/axios";
|
||||
import type { GetOrdersResponse } from "../types/Types";
|
||||
import type { GetOrdersResponse, GetOrderByIdResponse } from "../types/Types";
|
||||
|
||||
export interface GetOrdersParams {
|
||||
page?: number;
|
||||
@@ -17,3 +17,12 @@ export const getOrders = async (
|
||||
});
|
||||
return data;
|
||||
};
|
||||
|
||||
export const getOrderById = async (
|
||||
orderId: string
|
||||
): Promise<GetOrderByIdResponse> => {
|
||||
const { data } = await axios.get<GetOrderByIdResponse>(
|
||||
`/admin/orders/${orderId}`
|
||||
);
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user