You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
395 B
14 lines
395 B
import request from '@/utils/request';
|
|
import type { ApiResult } from '@/api';
|
|
import type { User } from './model';
|
|
|
|
/**
|
|
* 修改当前登录用户信息
|
|
*/
|
|
export async function authUser(data: User) {
|
|
const res = await request.put<ApiResult<unknown>>('/auth/user', data);
|
|
if (res.data.code === 0) {
|
|
return res.data.message;
|
|
}
|
|
return Promise.reject(new Error(res.data.message));
|
|
}
|