added use delete cart all

This commit is contained in:
Mamalizz
2025-03-13 01:36:51 +03:30
parent bc987c2739
commit 85ad719ce6
@@ -0,0 +1,25 @@
// imports
import { useMutation } from "@tanstack/vue-query";
import { API_ENDPOINTS } from "~/constants";
const useDeleteCartAll = () => {
// state
const { $axios: axios } = useNuxtApp();
// methods
const handleDeleteCartAll = async () => {
const { data } = await axios.delete(
API_ENDPOINTS.orders.cart.delete_all
);
return data;
};
return useMutation({
mutationFn: () => handleDeleteCartAll(),
});
};
export default useDeleteCartAll;