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

Function inviteCodeFrom

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

Source from the content-addressed store, hash-verified

255// inviteCode }`); Better Auth reads the body loosely, so a non-schema field
256// survives to the create hook's endpoint context.
257const inviteCodeFrom = (context: { body?: unknown }): string | undefined => {
258 const body = context.body;
259 if (body && typeof body === "object" && "inviteCode" in body) {
260 const code = (body as { inviteCode?: unknown }).inviteCode;
261 if (typeof code === "string" && code.trim().length > 0) return code;
262 }
263 return undefined;
264};
265
266// Count org members via Better Auth's OWN adapter. Now that auth shares
267// 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