profile.api.ts 490 Bytes
Newer Older
Kim, MinGyu's avatar
Kim, MinGyu committed
1
2
3
4
import axios from "axios";
import baseUrl from "./baseUrl";

export const profile = async () => {
5
6
7
8
9
10
11
12
13
14
15
  const { data } = await axios.get(`${baseUrl}/profile`);
  return data;
};

export const picture = async (formdata: FormData) => {
  await axios.post(`${baseUrl}/profile`, formdata);
};

export const nickname = async (formdata: FormData) => {
  await axios.post(`${baseUrl}/profile`, formdata);
};
Kim, MinGyu's avatar
Kim, MinGyu committed
16
17
18
19

export const deleteUser = async () => {
  await axios.post(`${baseUrl}/profile/delete`);
};