chore: 清理管理中心 fetchDashboardStats 与 GET /admin/stats 已无用的接口

This commit is contained in:
richarjiang
2026-09-10 19:23:08 +08:00
parent 99814f3720
commit 9af558286b
2 changed files with 2 additions and 40 deletions

View File

@@ -54,12 +54,6 @@ function normalizePaginatedData<T>(
}
}
export interface AdminStats {
todayBookings: number
totalOrders: number
totalBookings: number
}
export type MemberSummary = AdminMemberSummary
export interface UserMembership {
@@ -264,12 +258,7 @@ export const useAdminStore = defineStore('admin', () => {
await fetchSchedulePreview(dto.date)
}
// ── Dashboard stats ──────────────────────────────────────────────
async function fetchDashboardStats(): Promise<AdminStats> {
return get<AdminStats>('/admin/stats')
}
// ── Teaching analytics ─────────────────────────────────────────
// ── Teaching analytics ─────────────────────────────────────────
async function fetchTeachingAnalytics(month: string): Promise<TeachingAnalytics> {
return get<TeachingAnalytics>('/admin/teaching-analytics', { month })
}
@@ -315,7 +304,5 @@ export const useAdminStore = defineStore('admin', () => {
fetchSchedulePreview,
previewScheduleByDate,
publishDaySlots,
// Stats
fetchDashboardStats,
}
})