Skip to content

Commit

Permalink
include the code in the invite code database
Browse files Browse the repository at this point in the history
  • Loading branch information
chase-manning committed Nov 30, 2023
1 parent 49090b2 commit c293aa0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/src/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function generateAndSaveInviteCodes(user: string, count: number): P
const codes = [];
for (let i = 0; i < count; i++) {
const code = await generateInviteCode();
const codeMetadata = { creator: user, used: false, createdAt: Date.now() };
const codeMetadata = { creator: user, used: false, createdAt: Date.now(), code };
codes.push(code);
await db.ref("invites").child(code).set(codeMetadata);
}
Expand Down

0 comments on commit c293aa0

Please sign in to comment.