auth.api.js 393 Bytes
Newer Older
1
2
3
4
import axios from "axios";

const signup = async (user) => {
  const url = `/api/auth/signup`;
Choi Ga Young's avatar
Choi Ga Young committed
5
  const { data, status } = await axios.post(url, user);
6
7
8
9
10
11
12
  return { data, status }
}

const login = async (user) => {
  const url = `/api/auth/login`;
  const { data, status } = await axios.post(url, user);
  return { data, status }
13
14
15
}

const authApi = {
16
17
  signup, 
  login
18
19
20
};

export default authApi