]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/oauth-model.ts
Reduce AP context size on specific activities
[github/Chocobozzz/PeerTube.git] / server / lib / oauth-model.ts
index a1153e88a73822f83738e51dffb3a3acccda1775..086856f41e3a0fc64469f450e6b8044f8a694ba2 100644 (file)
@@ -8,10 +8,11 @@ import { LRU_CACHE } from '../initializers/constants'
 import { Transaction } from 'sequelize'
 import { CONFIG } from '../initializers/config'
 import * as LRUCache from 'lru-cache'
+import { MOAuthTokenUser } from '@server/typings/models/oauth/oauth-token'
 
 type TokenInfo = { accessToken: string, refreshToken: string, accessTokenExpiresAt: Date, refreshTokenExpiresAt: Date }
 
-const accessTokenCache = new LRUCache<string, OAuthTokenModel>({ max: LRU_CACHE.USER_TOKENS.MAX_SIZE })
+const accessTokenCache = new LRUCache<string, MOAuthTokenUser>({ max: LRU_CACHE.USER_TOKENS.MAX_SIZE })
 const userHavingToken = new LRUCache<number, string>({ max: LRU_CACHE.USER_TOKENS.MAX_SIZE })
 
 // ---------------------------------------------------------------------------