From ef5666b96e971254c112458f39cfd9b329080bf0 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 8 Aug 2020 11:25:34 +0300 Subject: feat!: only allow lowercase usernames --- models/users/user.schema.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3