MCPcopy
hub / github.com/BuilderIO/agent-native / currentUserEmail

Function currentUserEmail

packages/scheduling/src/actions/_helpers.ts:7–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Calls 1

getSchedulingContextFunction · 0.85

Tested by

no test coverage detected