first commit

This commit is contained in:
Awuqing
2026-03-17 13:29:09 +08:00
commit eadd3f8961
219 changed files with 22394 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import { http, type ApiEnvelope, unwrapApiEnvelope } from './http'
import type { BackupTimelinePoint, DashboardStats } from '../types/dashboard'
export async function fetchDashboardStats() {
const response = await http.get<ApiEnvelope<DashboardStats>>('/dashboard/stats')
return unwrapApiEnvelope(response.data)
}
export async function fetchDashboardTimeline(days = 30) {
const response = await http.get<ApiEnvelope<BackupTimelinePoint[]>>('/dashboard/timeline', { params: { days } })
return unwrapApiEnvelope(response.data)
}