(action: string, cookie: string, code?: string)
| 36 | }); |
| 37 | expect(billing.status).toBe(200); |
| 38 | const post = (action: string, cookie: string, code?: string) => |
| 39 | fetch(new URL(`/api/auth/admin-mfa/${action}`, target.baseUrl), { |
| 40 | method: "POST", |
| 41 | headers: { ...headers, origin: new URL(target.baseUrl).origin, cookie }, |
| 42 | body: JSON.stringify(code === undefined ? {} : { code }), |
| 43 | }); |
| 44 | const noOrigin = await fetch(new URL("/api/auth/admin-mfa/start", target.baseUrl), { |
| 45 | method: "POST", |
| 46 | headers, |
no test coverage detected