@@ -0,0 +1,14 @@
|
||||
import axios from '@/config/axios';
|
||||
import type { BaseResponse } from '@/shared/types/Types';
|
||||
|
||||
export type DashboardCountsType = {
|
||||
requestsCount: number;
|
||||
invoicesCount: number;
|
||||
ordersCount: number;
|
||||
paymentsCount: number;
|
||||
};
|
||||
|
||||
export const getDashboardCounts = async (): Promise<BaseResponse<DashboardCountsType>> => {
|
||||
const { data } = await axios.get<BaseResponse<DashboardCountsType>>('/admin/dashboard/counts');
|
||||
return data;
|
||||
};
|
||||
Reference in New Issue
Block a user