native_convex_CRM/app/api/leadsApi.ts
2026-07-22 13:33:19 +05:30

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);
};