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

Function toRow

apps/host-selfhost/src/auth/invites.ts:48–59  ·  view source on GitHub ↗
(raw: Row)

Source from the content-addressed store, hash-verified

46};
47
48const toRow = (raw: Row): InviteCodeRow => ({
49 id: String(raw.id),
50 code: String(raw.code),
51 role: raw.role === "admin" ? "admin" : "member",
52 label: raw.label == null ? null : String(raw.label),
53 createdBy: String(raw.created_by),
54 createdAt: String(raw.created_at),
55 expiresAt: raw.expires_at == null ? null : String(raw.expires_at),
56 usedBy: raw.used_by == null ? null : String(raw.used_by),
57 usedByEmail: raw.used_by_email == null ? null : String(raw.used_by_email),
58 usedAt: raw.used_at == null ? null : String(raw.used_at),
59});
60
61export const ensureInviteCodeTable = async (client: Client): Promise<void> => {
62 await client.execute(`

Callers 1

findRedeemableCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected