Spaces:
Sleeping
Sleeping
File size: 470 Bytes
cca35ea a940b3a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import client from './client'
export async function register(email, name, password) {
const { data } = await client.post('/auth/register', { email, name, password })
return data
}
export async function login(email, password) {
const form = new URLSearchParams({ username: email, password })
const { data } = await client.post('/auth/login', form)
return data
}
export async function getMe() {
const { data } = await client.get('/auth/me')
return data
}
|