Skip to content

Commit bbcc9a6

Browse files
author
Ian Redpath
committed
NOT STYLING. ensure username is unique
1 parent 6d94639 commit bbcc9a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/project/models/user.schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as mongoose from 'mongoose'
33
export default function() {
44

55
const UserSchema = new mongoose.Schema({
6-
username: String,
6+
username: { type: String, unique: true },
77
password: String,
88
firstname: String,
99
lastname: String,

0 commit comments

Comments
 (0)