import { request } from '@/service/request';

export interface UsersRes {
  id: number;
  email: string;
  name: string;
  phone: string;
  passwd: string;
  rePasswd: string;
}

export interface UserProFileRes {
  status: boolean;
  msg: string;
  data: Record<string, unknown>;
  code: number;
}

export function getUserProFile(): Promise<Service.RequestResult<UsersRes>> {
  return request.get(`/login/getUserProFile`);
}

export function userProFile(params: UsersRes): Promise<Service.RequestResult<UserProFileRes>> {
  return request.put(`/login/userProFile`, params);
}
