MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / inviteCodeFrom

Function inviteCodeFrom

apps/host-selfhost/src/auth/better-auth.ts:316–323  ·  view source on GitHub ↗
(context: { body?: unknown })

Source from the content-addressed store, hash-verified

314// inviteCode }`); Better Auth reads the body loosely, so a non-schema field
315// survives to the create hook's endpoint context.
316const inviteCodeFrom = (context: { body?: unknown }): string | undefined => {
317 const body = context.body;
318 if (body && typeof body === "object" && "inviteCode" in body) {
319 const code = (body as { inviteCode?: unknown }).inviteCode;
320 if (typeof code === "string" && code.trim().length > 0) return code;
321 }
322 return undefined;
323};
324
325// Count org members via Better Auth's OWN adapter. Now that auth shares
326// SelfHostDb's libSQL client (one connection), this no longer guards against a

Callers 1

makeAuthOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected