Commit a33691d6 authored by NGPixel's avatar NGPixel Committed by Nicolas Giard

fix: bypass users model when updating lastLoginAt

parent 1c80faa9
......@@ -342,7 +342,8 @@ module.exports = class User extends Model {
}
// Update Last Login Date
await WIKI.models.users.query().findById(user.id).patch({ lastLoginAt: new Date().toISOString() })
// -> Bypass Objection.js to avoid updating the updatedAt field
await WIKI.models.knex('users').where('id', user.id).update({ lastLoginAt: new Date().toISOString() })
return {
token: jwt.sign({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment