changed file name
This commit is contained in:
+6
-6
@@ -5,17 +5,17 @@ import { API_ENDPOINTS, QUERY_KEYS } from "~/constants";
|
|||||||
|
|
||||||
// types
|
// types
|
||||||
|
|
||||||
export type GetOrdersCartResponse = Cart;
|
export type GetCartOrdersResponse = Cart;
|
||||||
|
|
||||||
const useGetOrdersCart = () => {
|
const useGetCartOrders = () => {
|
||||||
// state
|
// state
|
||||||
|
|
||||||
const { $axios: axios } = useNuxtApp();
|
const { $axios: axios } = useNuxtApp();
|
||||||
|
|
||||||
// methods
|
// methods
|
||||||
|
|
||||||
const handleGetOrdersCart = async () => {
|
const handleGetCartOrders = async () => {
|
||||||
const { data } = await axios.get<GetOrdersCartResponse>(
|
const { data } = await axios.get<GetCartOrdersResponse>(
|
||||||
API_ENDPOINTS.orders.cart.get_all
|
API_ENDPOINTS.orders.cart.get_all
|
||||||
);
|
);
|
||||||
return data;
|
return data;
|
||||||
@@ -23,8 +23,8 @@ const useGetOrdersCart = () => {
|
|||||||
|
|
||||||
return useQuery({
|
return useQuery({
|
||||||
queryKey: [QUERY_KEYS.cart],
|
queryKey: [QUERY_KEYS.cart],
|
||||||
queryFn: () => handleGetOrdersCart(),
|
queryFn: () => handleGetCartOrders(),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export default useGetOrdersCart;
|
export default useGetCartOrders;
|
||||||
Reference in New Issue
Block a user