fix: 修正登录接口路径,auth/login → login 对齐后端路由
Some checks failed
Build & Deploy Admin / deploy (push) Has been cancelled

This commit is contained in:
Wang Zhuoxuan 2026-04-23 14:58:23 +08:00
parent 73463f33c2
commit c25e474cb5

View File

@ -6,12 +6,12 @@ import type { Admin, CreateAdminRequest, CreateAdminResponse, ResetPasswordRespo
/** /**
* *
* POST /admin/auth/login * POST /admin/login
*/ */
export async function loginAdmin( export async function loginAdmin(
credentials: { username: string; password: string } credentials: { username: string; password: string }
): Promise<ApiResponse<LoginResponse>> { ): Promise<ApiResponse<LoginResponse>> {
return apiClient.post("auth/login", { json: credentials }).json<ApiResponse<LoginResponse>>() return apiClient.post("login", { json: credentials }).json<ApiResponse<LoginResponse>>()
} }
/** /**