Add admin analytics trend views
This commit is contained in:
1 parent
a58fc43d94
commit
105efc40d5
8 files changed
+869
-45
No files matched your search
+10
-1
@@ -1,8 +1,17 @@
|
||||
import api from './client'
|
||||
import type { ApiResponse, DashboardData } from '@/types'
|
||||
import type { AnalyticsData, ApiResponse, DashboardData } from '@/types'
|
||||
|
||||
export class StatsService {
|
||||
static async getDashboard(): Promise<ApiResponse<DashboardData>> {
|
||||
return api.get('/admin/dashboard')
|
||||
}
|
||||
|
||||
static async getAnalytics(start?: string, end?: string): Promise<ApiResponse<AnalyticsData>> {
|
||||
return api.get('/admin/analytics', {
|
||||
params: {
|
||||
start,
|
||||
end
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user