1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Add last login date to users

This commit is contained in:
Chocobozzz 2020-05-07 10:39:09 +02:00
parent ee8e602ef9
commit 3cc665f48f
No known key found for this signature in database
GPG key ID: 583A612D890159BE
10 changed files with 107 additions and 9 deletions

View file

@ -180,6 +180,10 @@ async function saveToken (token: TokenInfo, client: OAuthClientModel, user: User
}
const tokenCreated = await OAuthTokenModel.create(tokenToCreate)
user.lastLoginDate = new Date()
await user.save()
return Object.assign(tokenCreated, { client, user })
}