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:
parent
ee8e602ef9
commit
3cc665f48f
10 changed files with 107 additions and 9 deletions
|
@ -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 })
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue