feat: user profile page - save info + change pwd

This commit is contained in:
NGPixel authored and Nicolas Giard committed 2020-04-05 23:49:26 -04:00
1 parent c7f3c9d908
commit 1e4d513252
19 files changed
+473 -113

No files matched your search

+3
View File
@@ -341,6 +341,9 @@ module.exports = class User extends Model {
user.groups = await user.$relatedQuery('groups').select('groups.id', 'permissions')
}
// Update Last Login Date
await WIKI.models.users.query().findById(user.id).patch({ lastLoginAt: new Date().toISOString() })
return {
token: jwt.sign({
id: user.id,