/**
 * 用户信息接口
 */
import { request } from '../../utils/request'
import type { UserInfo } from '../../types/user'

/**
 * 获取用户信息
 */
export const getUserInfo = (userId: any): Promise<UserInfo> => {
    return request({
        url: '/system/user/'+userId,
        method: 'GET'
    })
}

/**
 * 更新用户信息
 */
export const updateUserInfo = (userInfo: UserInfo): Promise<boolean> => {
    return request<boolean>({
        url: '/api/user/info',
        method: 'PUT',
        data: userInfo as any as UTSJSONObject
    })
}

