(email, password)
| 25 | } |
| 26 | |
| 27 | export async function register(email, password) { |
| 28 | const res = await fetch(`${API_BASE}/auth/register`, { |
| 29 | method: 'POST', |
| 30 | headers: { 'Content-Type': 'application/json' }, |
| 31 | body: JSON.stringify({ email, password }), |
| 32 | }); |
| 33 | const data = await res.json(); |
| 34 | if (!res.ok) throw new Error(data.error || 'Registration failed'); |
| 35 | return data; |
| 36 | } |
| 37 | |
| 38 | export async function getMe() { |
| 39 | const res = await fetch(`${API_BASE}/auth/me`, { headers: getHeaders() }); |
nothing calls this directly
no outgoing calls
no test coverage detected