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

Function slugTaken

apps/cloud/src/auth/user-store.ts:71–77  ·  view source on GitHub ↗
(slug: string)

Source from the content-addressed store, hash-verified

69 row: Pick<Organization, "id" | "name" | "workosUpdatedAt" | "deletedAt">,
70): Promise<Organization> => {
71 const slugTaken = async (slug: string) => {
72 const rows = await db
73 .select({ id: organizations.id })
74 .from(organizations)
75 .where(eq(organizations.slug, slug));
76 return rows.length > 0;
77 };
78 for (let attempt = 0; attempt < 4; attempt++) {
79 const slug = await generateOrgSlug(row.name, slugTaken);
80 const [inserted] = await db

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected