(raw: Row)
| 46 | }; |
| 47 | |
| 48 | const 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 | |
| 61 | export const ensureInviteCodeTable = async (client: Client): Promise<void> => { |
| 62 | await client.execute(` |
no outgoing calls
no test coverage detected