paginate false

This commit is contained in:
hamid zarghami
2025-05-12 12:23:53 +03:30
parent 48b140e177
commit 519c0c3e6a
6 changed files with 21 additions and 8 deletions
@@ -1,8 +1,10 @@
import axios from "../../../config/axios";
import { CreateCustomerType } from "../types/CustomerTypes";
export const getCustomers = async (page: number) => {
const { data } = await axios.get(`/users/customers?page=${page}`);
export const getCustomers = async (page: number, withoutPaginate?: boolean) => {
const { data } = await axios.get(
`/users/customers?page=${page}&paginate=${withoutPaginate ? "0" : "1"}`
);
return data;
};