(path, body)
| 42 | } |
| 43 | |
| 44 | async function authRequest(path, body) { |
| 45 | return fetch(path, { |
| 46 | method: "POST", |
| 47 | credentials: "include", |
| 48 | headers: {'Content-Type': 'application/json'}, |
| 49 | ...(body && {body: JSON.stringify(body)}), |
| 50 | }); |
| 51 | } |
| 52 | |
| 53 | export async function login(email, password) { |
| 54 | const username = email.split('@')[0]; |
no outgoing calls
no test coverage detected