Skip to content

Commit

Permalink
making usernames unique
Browse files Browse the repository at this point in the history
  • Loading branch information
kennyg37 committed Apr 4, 2024
1 parent 0653a5d commit 82d13bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/models/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export interface IUser extends mongoose.Document {

const UserSchema = new mongoose.Schema({
account: { type: String, enum:['admin', 'guest'], required: true },
username: { type: String, required: true },
email: { type: String, required: true },
username: { type: String, required: true, unique: true},
email: { type: String, required: true, unique: true},
password: { type: String, required: true },
},
{
Expand Down

0 comments on commit 82d13bc

Please sign in to comment.