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

Kim, Chaerin's avatar
.    
Kim, Chaerin committed
3
const login = async (payload) => {
4
  const { data } = await axios.post("/api/login", payload);
5
6
7
  return data;
};

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

const userApi = { login, signup };

export default userApi;