Components for user modification, email validation

This commit is contained in:
oitsjustjose 2022-04-14 21:03:37 -05:00
commit 99a3d7ff33
9 changed files with 193 additions and 3 deletions

View file

@ -7,6 +7,7 @@ export type UserModel = Document & {
email: string;
password: string;
admin: boolean;
isEmailValidated: boolean;
hashPassword: (password: string) => string;
validPassword: (password: string) => boolean;
};
@ -16,6 +17,10 @@ const UserSchema = new Schema<UserModel>({
last: String,
email: String,
password: String,
isEmailValidated: {
type: Boolean,
default: false,
},
admin: {
type: Boolean,
default: false,