import http from '@/utils/http';

export async function changeName(nickname: string) {
  const { ok, msg } = await http.post('/user/chnickname', { nickname });
  if (ok) {
    return true;
  }
  throw Error(msg);
}
