Skip to content

Commit

Permalink
Added a fix to use current date [no version update]
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrea committed Jun 3, 2024
1 parent 7d371c4 commit cabe5b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/models/schemas/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ const UserSchema = new mongoose.Schema({
* @type {Date}
* @default Date.now
*/
createdAt: { type: Date, default: Date.now() },
createdAt: {
type: Date,
default: () => Date.now(), // Use a function to get the current date
},

/**
* Request rate limit for the user.
Expand Down

0 comments on commit cabe5b6

Please sign in to comment.