refactor: modularize frontend flows

This commit is contained in:
Lan committed 2026-06-03 02:01:57 +08:00
1 parent 9300607f96
commit a11e7900b4
85 files changed
+4654 -4363

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import api from './client'
import type { AdminUser, ApiResponse } from '@/types'
export class AuthService {
static async login(password: string): Promise<ApiResponse<AdminUser>> {
return api.post('/admin/login', { password })
}
static async logout(): Promise<ApiResponse> {
return api.post('/admin/logout')
}
static async verifyToken(): Promise<ApiResponse<AdminUser>> {
return api.get('/admin/verify')
}
}