Skip to content

Commit

Permalink
feat: add unique index for group invite code
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Jul 13, 2023
1 parent 738eb75 commit 8c1c03e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/models/group/invite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export class GroupInvite extends TimeStamps implements Base {

@prop({
index: true,
unique: true,
default: () => generateCode(),
})
code!: string;
Expand Down

0 comments on commit 8c1c03e

Please sign in to comment.