MCPcopy Create free account
hub / github.com/curdinc/skylar-email / createInviteCode

Function createInviteCode

packages/db/src/invite-code/create-invite-code.ts:4–15  ·  view source on GitHub ↗
({
  db,
  inviteCode,
}: {
  db: DbType;
  inviteCode: string;
})

Source from the content-addressed store, hash-verified

2import { schema } from "../..";
3
4export async function createInviteCode({
5 db,
6 inviteCode,
7}: {
8 db: DbType;
9 inviteCode: string;
10}) {
11 return db.insert(schema.inviteCode).values({ inviteCode }).returning({
12 inviteCode: schema.inviteCode.inviteCode,
13 inviteCodeId: schema.inviteCode.inviteCodeId,
14 });
15}

Callers 1

invite-code.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected