(email, password)
| 14 | |
| 15 | // Auth |
| 16 | export async function login(email, password) { |
| 17 | const res = await fetch(`${API_BASE}/auth/login`, { |
| 18 | method: 'POST', |
| 19 | headers: { 'Content-Type': 'application/json' }, |
| 20 | body: JSON.stringify({ email, password }), |
| 21 | }); |
| 22 | const data = await res.json(); |
| 23 | if (!res.ok) throw new Error(data.error || 'Login failed'); |
| 24 | return data; |
| 25 | } |
| 26 | |
| 27 | export async function register(email, password) { |
| 28 | const res = await fetch(`${API_BASE}/auth/register`, { |
nothing calls this directly
no outgoing calls
no test coverage detected