18 lines
478 B
TypeScript
18 lines
478 B
TypeScript
import { LeadItem, LeadCountItem } from '@interfaces';
|
|
import { api } from '@utils';
|
|
|
|
export const getLeadsApi = async (
|
|
leadId: string | null,
|
|
staffId: string,
|
|
): Promise<LeadItem[]> => {
|
|
const url = `/api/leads/${leadId}/${staffId}`;
|
|
return await api.get<LeadItem[]>(url);
|
|
};
|
|
|
|
export const getLeadCountListApi = async (
|
|
staffId: string,
|
|
): Promise<LeadCountItem[]> => {
|
|
const url = `/api/leadcountlist/${staffId}`;
|
|
return await api.get<LeadCountItem[]>(url);
|
|
};
|