aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/auth/tokens-cache.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-01-09 09:44:00 +0100
committerChocobozzz <me@florianbigard.com>2023-01-09 09:44:00 +0100
commit0a8a79552cf59c800011c9f63eaa8658230acddc (patch)
treee797870a2660ca342722eaea426ed8a588a640b9 /server/lib/auth/tokens-cache.ts
parentcde3d90ded5debb24281a444eabb720b721e5600 (diff)
parent2570fd9c1c879d1a543fb0dff1e7cfb036234d11 (diff)
downloadPeerTube-0a8a79552cf59c800011c9f63eaa8658230acddc.tar.gz
PeerTube-0a8a79552cf59c800011c9f63eaa8658230acddc.tar.zst
PeerTube-0a8a79552cf59c800011c9f63eaa8658230acddc.zip
Merge branch 'feature/SO035' into develop
Diffstat (limited to 'server/lib/auth/tokens-cache.ts')
-rw-r--r--server/lib/auth/tokens-cache.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/auth/tokens-cache.ts b/server/lib/auth/tokens-cache.ts
index 410708a35..43efc7d02 100644
--- a/server/lib/auth/tokens-cache.ts
+++ b/server/lib/auth/tokens-cache.ts
@@ -36,8 +36,8 @@ export class TokensCache {
36 const token = this.userHavingToken.get(userId) 36 const token = this.userHavingToken.get(userId)
37 37
38 if (token !== undefined) { 38 if (token !== undefined) {
39 this.accessTokenCache.del(token) 39 this.accessTokenCache.delete(token)
40 this.userHavingToken.del(userId) 40 this.userHavingToken.delete(userId)
41 } 41 }
42 } 42 }
43 43
@@ -45,8 +45,8 @@ export class TokensCache {
45 const tokenModel = this.accessTokenCache.get(token) 45 const tokenModel = this.accessTokenCache.get(token)
46 46
47 if (tokenModel !== undefined) { 47 if (tokenModel !== undefined) {
48 this.userHavingToken.del(tokenModel.userId) 48 this.userHavingToken.delete(tokenModel.userId)
49 this.accessTokenCache.del(token) 49 this.accessTokenCache.delete(token)
50 } 50 }
51 } 51 }
52} 52}