profile.api.ts 445 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
  const { data } = await axios.get(`${baseUrl}/profile`);
  return data;
};

Kim, MinGyu's avatar
Kim, MinGyu committed
9
export const profileUpload = async (formdata: FormData) => {
Yoon, Daeki's avatar
Yoon, Daeki committed
10
11
  const { data } = await axios.post(`${baseUrl}/profile`, formdata);
  return data;
12
};
Kim, MinGyu's avatar
Kim, MinGyu committed
13
14

export const deleteUser = async () => {
Kim, MinGyu's avatar
수정    
Kim, MinGyu committed
15
  const success = await axios.delete(`${baseUrl}/profile`);
Kim, MinGyu's avatar
Kim, MinGyu committed
16
  return success;
Kim, MinGyu's avatar
Kim, MinGyu committed
17
};