Skip to content

Commit

Permalink
fix(user): remet la fonction qui avait sauté au formattage
Browse files Browse the repository at this point in the history
refs #1147
  • Loading branch information
thom4parisot committed Feb 12, 2025
1 parent ca27b8b commit df3656e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions graphql/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ userSchema.methods.createDefaultArticle = async function createDefaultArticle ()

await newArticle.createNewVersion({ mode: 'MINOR', user: this })

this.articles.push(newArticle)
return this.save()
userSchema.statics.assessLogin = async function assessLogin(query) {
const user = this.findOne(query)
user.connectedAt = Date.now()
return user.save()
}

userSchema.virtual('authTypes').get(function () {
Expand Down

0 comments on commit df3656e

Please sign in to comment.