feat: 接入权限接口

This commit is contained in:
xy
2026-09-24 08:31:21 +08:00
parent 93fb5fd2c4
commit e5b5412322
24 changed files with 2398 additions and 1738 deletions
+6
View File
@@ -9,6 +9,7 @@ import { request } from '@/utils/request'
import type {
AuthenticatedUser,
CaptchaResponse,
CurrentAuthorization,
CurrentUserResponse,
LoginRequest,
LoginResponse,
@@ -76,6 +77,11 @@ export async function getCurrentUser(): Promise<CurrentUserResponse> {
}
}
export async function getCurrentAuthorization(): Promise<CurrentAuthorization> {
const response = await request.get<ApiResponse<CurrentAuthorization>>('/v1/authorization/me')
return unwrapApiResponse(response)
}
export async function logout(): Promise<void> {
const response = await request.post<ApiResponse<Record<string, never>>>('/v1/auth/logout')
unwrapApiResponse(response)