Components for user modification, email validation
This commit is contained in:
parent
01227bb28f
commit
99a3d7ff33
9 changed files with 193 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue