()
| 62 | } |
| 63 | |
| 64 | export async function hasActiveSession(): Promise<boolean> { |
| 65 | const { authApiBasePath } = getApiClient(); |
| 66 | |
| 67 | try { |
| 68 | const response = await fetch(`${authApiBasePath}/api/sql`, { |
| 69 | method: "POST", |
| 70 | headers: { |
| 71 | "Content-Type": "application/json", |
| 72 | }, |
| 73 | body: JSON.stringify({ queries: [{ query: "SELECT 1", params: [] }] }), |
| 74 | }); |
| 75 | return response.ok; |
| 76 | } catch { |
| 77 | return false; |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | export async function logout(logoutParams: { |
| 82 | apiClient: SelfManagedApiClient; |
nothing calls this directly
no test coverage detected