aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-26 21:11:15 +0300
committereug-vs <eug-vs@keemail.me>2020-06-26 21:11:15 +0300
commit7f9df8559139cbda04c480615c4ed25f57c4bbcd (patch)
tree11cc8a1f4a5573220f47d3c1b5c3a5ee8fb72e17
parent1fbf5ffbabc1ea2924e68c735e4d2b87643b5fc0 (diff)
downloadwhich-api-7f9df8559139cbda04c480615c4ed25f57c4bbcd.tar.gz
feat: add verified field to user schema
-rw-r--r--models/users/user.schema.ts15
1 files changed, 13 insertions, 2 deletions
diff --git a/models/users/user.schema.ts b/models/users/user.schema.ts
index ff6cbe9..5969604 100644
--- a/models/users/user.schema.ts
+++ b/models/users/user.schema.ts
@@ -6,9 +6,20 @@ export interface UserSchema extends Document, Omit<User, '_id'> {
}
export const userSchema = new Schema({
- username: String,
- password: String,
+ username: {
+ type: String,
+ unique: true,
+ required: true
+ },
+ password: {
+ type: String,
+ required: true
+ },
email: String,
+ verified: {
+ type: Boolean,
+ default: false
+ },
avatarUrl: {
type: String,
required: false