user.api.js 445 Bytes
Newer Older
1
2
import axios from "axios";

우지원's avatar
0726    
우지원 committed
3
const getUser = async (payload) => {
seoyeon's avatar
0727    
seoyeon committed
4
  const { data } = await axios.post("/api/getUser", payload);
우지원's avatar
0726    
우지원 committed
5
6
7
  return data;
};

Kim, Chaerin's avatar
.    
Kim, Chaerin committed
8
const login = async (payload) => {
9
  const { data } = await axios.post("/api/login", payload);
10
11
12
  return data;
};

Kim, Chaerin's avatar
.    
Kim, Chaerin committed
13
const signup = async (payload) => {
14
  const { data } = await axios.post("/api/signup", payload);
Kim, Chaerin's avatar
.    
Kim, Chaerin committed
15
16
17
  return data;
};

우지원's avatar
0726    
우지원 committed
18
const userApi = { getUser, login, signup };
Kim, Chaerin's avatar
.    
Kim, Chaerin committed
19
20

export default userApi;