Skip to content

Commit

Permalink
Merge pull request #59 from WaifuAPI/staging
Browse files Browse the repository at this point in the history
Added a fix to use current date [no version update]
  • Loading branch information
kyrea authored Jun 3, 2024
2 parents 8207f90 + cabe5b6 commit 3bc80c5
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 3bc80c5

Please sign in to comment.