aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-08-08 11:25:34 +0300
committereug-vs <eug-vs@keemail.me>2020-08-08 11:25:34 +0300
commitef5666b96e971254c112458f39cfd9b329080bf0 (patch)
tree1e74ad306fda272dff64467b5b34ffe83300ad2d
parent6b04525bf529baca8d2fa2d591f3162bd4d88d4f (diff)
downloadwhich-api-ef5666b96e971254c112458f39cfd9b329080bf0.tar.gz
feat!: only allow lowercase usernames
-rw-r--r--models/users/user.schema.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/users/user.schema.ts b/models/users/user.schema.ts
index 5969604..f6a1c09 100644
--- a/models/users/user.schema.ts
+++ b/models/users/user.schema.ts
@@ -9,7 +9,8 @@ export const userSchema = new Schema({
username: {
type: String,
unique: true,
- required: true
+ required: true,
+ lowercase: true
},
password: {
type: String,