latest
This commit is contained in:
1 parent
d0834df8df
commit
6dc35134fa
171 files changed
+19241
-49
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { apiClient } from '../../services/apiClient'
|
||||
import type { ActivityItem } from '../../components/desktop/ActivityTimeline'
|
||||
|
||||
export interface DashboardStats {
|
||||
total_users: number
|
||||
users_by_role: Record<string, number>
|
||||
}
|
||||
|
||||
export async function fetchStats(): Promise<DashboardStats> {
|
||||
const { data } = await apiClient.get('/dashboard/stats')
|
||||
return data
|
||||
}
|
||||
|
||||
export async function fetchActivity(): Promise<ActivityItem[]> {
|
||||
const { data } = await apiClient.get('/dashboard/activity')
|
||||
return data.data as ActivityItem[]
|
||||
}
|
||||
Reference in new issue
Block a user