]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/redis.ts
Translated using Weblate (Chinese (Simplified))
[github/Chocobozzz/PeerTube.git] / server / lib / redis.ts
index 52766663ac822b697c3593fecfa0a457804ee9e5..f544274ea0c80ff64256a441ea330d37bbc3cddc 100644 (file)
@@ -365,8 +365,10 @@ class Redis {
     return this.client.incr(this.prefix + key)
   }
 
-  private exists (key: string) {
-    return this.client.exists(this.prefix + key)
+  private async exists (key: string) {
+    const result = await this.client.exists(this.prefix + key)
+
+    return result !== 0
   }
 
   private setExpiration (key: string, ms: number) {