Spaces:
Sleeping
Sleeping
Download frontend/src/api/auth.js from avborg/adventure-log: direct link, hf CLI and curl.
- Browser
- Download file 470 Bytes
-
https://huggingface.co/spaces/avborg/adventure-log/resolve/main/frontend/src/api/auth.js
- Command line
-
hf download hf://spaces/avborg/adventure-log/frontend/src/api/auth.js
-
curl -L -o auth.js https://huggingface.co/spaces/avborg/adventure-log/resolve/main/frontend/src/api/auth.js
470 Bytes
| 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 | |
| } | |