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

Function addMember

apps/host-selfhost/src/auth/member-directory.test.ts:37–45  ·  view source on GitHub ↗
(email: string, name: string, role: "admin" | "member")

Source from the content-addressed store, hash-verified

35 Effect.runPromise(body.pipe(Effect.provide(directoryLayer)));
36
37const addMember = async (email: string, name: string, role: "admin" | "member") => {
38 const created = await auth.api.createUser({
39 body: { email, name, password: "pw-12345678" },
40 });
41 await auth.api.addMember({
42 body: { userId: created.user.id, role, organizationId },
43 });
44 return created.user.id;
45};
46
47// Better Auth lower-cases the email it stores; the mixed case here proves the
48// directory does not depend on that.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected