(email: string, password: string)
| 28 | const BASE = "http://localhost:4788"; |
| 29 | |
| 30 | const signIn = async (email: string, password: string): Promise<string> => { |
| 31 | const response = await handler( |
| 32 | new Request(`${BASE}/api/auth/sign-in/email`, { |
| 33 | method: "POST", |
| 34 | headers: { "content-type": "application/json" }, |
| 35 | body: JSON.stringify({ email, password }), |
| 36 | }), |
| 37 | ); |
| 38 | return response.headers.get("set-auth-token") ?? ""; |
| 39 | }; |
| 40 | |
| 41 | const adminUsers = (token?: string, path = "/api/admin/users") => |
| 42 | handler( |
no test coverage detected