mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 15:06:36 +08:00
用户详情
This commit is contained in:
@@ -289,6 +289,15 @@ export class AdminService extends BaseService {
|
||||
return this.get<ListUsersResponse>('/users', request as unknown as Record<string, unknown>);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户详情
|
||||
* @param id - 用户 ID
|
||||
* @returns 用户完整资料
|
||||
*/
|
||||
static async getUser(id: string): Promise<AdminUser> {
|
||||
return this.get<AdminUser>(`/users/${ id }`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新用户状态
|
||||
* @param id - 用户 ID
|
||||
@@ -326,6 +335,14 @@ export class AdminService extends BaseService {
|
||||
return this.post<AdminUser>('/users', request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户
|
||||
* @param id - 用户 ID
|
||||
*/
|
||||
static async deleteUser(id: string): Promise<void> {
|
||||
return this.delete<void>(`/users/${ id }`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取系统状态
|
||||
* @returns 系统状态指标数据
|
||||
|
||||
@@ -194,12 +194,24 @@ export interface AdminUser {
|
||||
username: string;
|
||||
/** 昵称 */
|
||||
nickname: string;
|
||||
/** 邮箱 */
|
||||
email?: string;
|
||||
/** 头像 URL */
|
||||
avatar_url: string;
|
||||
/** 是否激活 */
|
||||
is_active: boolean;
|
||||
/** 是否管理员 */
|
||||
is_admin: boolean;
|
||||
/** 个人简介 */
|
||||
bio?: string;
|
||||
/** 手机号 */
|
||||
phone?: string;
|
||||
/** 性别 */
|
||||
gender?: string;
|
||||
/** 个人网站 */
|
||||
website?: string;
|
||||
/** 所在地 */
|
||||
location?: string;
|
||||
/** 最后登录时间 */
|
||||
last_login_at: string;
|
||||
/** 创建时间 */
|
||||
@@ -363,4 +375,3 @@ export interface UpdateTemplateRequest {
|
||||
content: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user