X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fauth%2Ftokens-cache.ts;h=e7b12159b7504e4e122a3aead4aea00fa925219f;hb=785471d3e681117b1b33285f04ecc7933055f75d;hp=b027ce69a473bfe0508655411dd9f5ad8ff57575;hpb=dc48fdbe68e9dd3a3a6028181e61d8595d98e654;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/auth/tokens-cache.ts b/server/lib/auth/tokens-cache.ts index b027ce69a..e7b12159b 100644 --- a/server/lib/auth/tokens-cache.ts +++ b/server/lib/auth/tokens-cache.ts @@ -1,4 +1,4 @@ -import * as LRUCache from 'lru-cache' +import { LRUCache } from 'lru-cache' import { MOAuthTokenUser } from '@server/types/models' import { LRU_CACHE } from '../../initializers/constants' @@ -36,8 +36,8 @@ export class TokensCache { const token = this.userHavingToken.get(userId) if (token !== undefined) { - this.accessTokenCache.del(token) - this.userHavingToken.del(userId) + this.accessTokenCache.delete(token) + this.userHavingToken.delete(userId) } } @@ -45,8 +45,8 @@ export class TokensCache { const tokenModel = this.accessTokenCache.get(token) if (tokenModel !== undefined) { - this.userHavingToken.del(tokenModel.userId) - this.accessTokenCache.del(token) + this.userHavingToken.delete(tokenModel.userId) + this.accessTokenCache.delete(token) } } }