auth.js 276 Bytes
Newer Older
우지원's avatar
01_06    
우지원 committed
1
2
3
import axios from "axios"

//자동으로 localstorage에 login이 생성됨
4
export function handleLogin(props) {
JeongYeonwoo's avatar
JeongYeonwoo committed
5
    localStorage.setItem('user', props.email)
우지원's avatar
01_06    
우지원 committed
6
7
8
9
}


export async function handleLogout() {
10
11
    localStorage.removeItem('user')
    await axios.get('/auth/logout')
우지원's avatar
01_06    
우지원 committed
12
}