profile.api.ts 418 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
15
  const success = await axios.post(`${baseUrl}/profile/delete`);
  return success;
Kim, MinGyu's avatar
Kim, MinGyu committed
16
};