Skip to content

Commit

Permalink
feat : Server resetPasswordToken & resetPasswordExpries
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee-Dongwook committed Oct 20, 2024
1 parent 70539fa commit d86a3cd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions server/src/models/user.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ interface IUser extends Document {
username: string;
email: string;
password: string;
resetPasswordToken?: string;
resetPasswordExpires?: Date;
createdAt: Date;
comparePassword(candidatePassword: string): Promise<boolean>;
}
Expand All @@ -24,6 +26,14 @@ const UserSchema = new Schema<IUser>({
type: String,
required: true,
},
resetPasswordToken: {
type: String,
default: null,
},
resetPasswordExpires: {
type: Date,
default: null,
},
createdAt: {
type: Date,
default: Date.now,
Expand Down

0 comments on commit d86a3cd

Please sign in to comment.