profile.api.ts 420 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) => {
10
11
  await axios.post(`${baseUrl}/profile`, formdata);
};
Kim, MinGyu's avatar
Kim, MinGyu committed
12
13

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