16 lines
386 B
JavaScript
16 lines
386 B
JavaScript
import http from './http'
|
|
|
|
export async function login(username, password) {
|
|
const response = await http.post('/auth/login', { username, password })
|
|
return response.data
|
|
}
|
|
|
|
export async function logout() {
|
|
const response = await http.post('/auth/logout')
|
|
return response.data
|
|
}
|
|
|
|
export async function me() {
|
|
const response = await http.get('/auth/me')
|
|
return response.data
|
|
} |