From d86a3cd6e5d154d084de43f861a7ca38bd7b6e72 Mon Sep 17 00:00:00 2001 From: Lee-Dongwook Date: Sun, 20 Oct 2024 12:10:29 +0900 Subject: [PATCH] feat : Server resetPasswordToken & resetPasswordExpries --- server/src/models/user.model.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/src/models/user.model.ts b/server/src/models/user.model.ts index cbf7a10..cf31186 100644 --- a/server/src/models/user.model.ts +++ b/server/src/models/user.model.ts @@ -5,6 +5,8 @@ interface IUser extends Document { username: string; email: string; password: string; + resetPasswordToken?: string; + resetPasswordExpires?: Date; createdAt: Date; comparePassword(candidatePassword: string): Promise; } @@ -24,6 +26,14 @@ const UserSchema = new Schema({ type: String, required: true, }, + resetPasswordToken: { + type: String, + default: null, + }, + resetPasswordExpires: { + type: Date, + default: null, + }, createdAt: { type: Date, default: Date.now,