import type { UserInfo } from '@vben/types';

import { requestClient } from '#/api/request';

/**
 * 获取用户信息
 */
export async function getUserInfoApi() {
  const userinfo = await requestClient.get<UserInfo>('/user/detail');
  return {
    roles: [],
    realName: userinfo['nick_name'],
    roleName: userinfo['role_name']
  }
}