chore: build
This commit is contained in:
@@ -233,10 +233,19 @@ export const getAllClients = async (
|
||||
};
|
||||
};
|
||||
|
||||
// Totaux globaux (toute la base, pas seulement la page chargée).
|
||||
export interface UserCounts {
|
||||
all: number;
|
||||
client: number;
|
||||
livreur: number;
|
||||
cabine: number;
|
||||
admin: number;
|
||||
}
|
||||
|
||||
export const getAllUsers = async (
|
||||
offset = 0,
|
||||
limit = 100,
|
||||
): Promise<PagedResult<AdminUserItem>> => {
|
||||
): Promise<PagedResult<AdminUserItem> & { counts?: UserCounts }> => {
|
||||
const { data } = await apiClient.get(`${V2}/admin/protected/all/users`, {
|
||||
params: { limit, offset },
|
||||
});
|
||||
@@ -244,6 +253,7 @@ export const getAllUsers = async (
|
||||
items: data.users || [],
|
||||
total: data.count ?? 0,
|
||||
hasMore: !!data.has_more,
|
||||
counts: data.counts ?? undefined,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user