()
| 5 | import { getSchedulingContext } from "../server/context.js"; |
| 6 | |
| 7 | export function currentUserEmail(): string { |
| 8 | const email = getSchedulingContext().getCurrentUserEmail(); |
| 9 | if (!email) throw new Error("Not authenticated"); |
| 10 | return email; |
| 11 | } |
| 12 | |
| 13 | export function currentUserEmailOrNull(): string | null { |
| 14 | return getSchedulingContext().getCurrentUserEmail() ?? null; |
no test coverage detected