初始化

This commit is contained in:
Weiming committed 2026-09-11 13:56:36 +08:00
commit 3a4e81a070
43 files changed
+10871

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
import request from './request'
export interface UserProfile {
id: number
employeeNo: string
realName: string
avatarUrl: string
email: string
departmentName: string
position: string
userType: string
status: string
feishuStatus: string
lastLoginAt: string
}
export interface LoginResponse {
token: string
tokenType: string
expiresIn: number
user: UserProfile
}
export const authApi = {
feishuLogin: (code: string, state?: string): Promise<LoginResponse> =>
request.post('/auth/feishu-login', { code, state }),
getAuthUrl: (): Promise<{ authUrl: string }> => request.get('/feishu/auth-url'),
getUserInfo: (): Promise<UserProfile> =>
request.get('/auth/me'),
refreshToken: (): Promise<LoginResponse> =>
request.post('/auth/refresh'),
logout: (): Promise<void> =>
request.post('/auth/logout'),
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.