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

Optimize updating oauth tokens activity

This commit is contained in:
Chocobozzz 2025-09-10 15:16:40 +02:00
parent efa32646ed
commit bbc1afada5
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 10 additions and 14 deletions

View file

@ -13,8 +13,7 @@ export function authenticate (req: express.Request, res: express.Response, next:
res.locals.oauth = { token }
res.locals.authenticated = true
UpdateTokenSessionScheduler.Instance.addToUpdate({
id: token.id,
UpdateTokenSessionScheduler.Instance.addToUpdate(token.id, {
lastActivityDate: new Date(),
lastActivityIP: req.ip,
lastActivityDevice: req.header('user-agent')