Explorar o código

Fix stats cache time

poeti8 %!s(int64=7) %!d(string=hai) anos
pai
achega
e94fa4ac76
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      server/utils/index.js

+ 4 - 4
server/utils/index.js

@@ -15,15 +15,15 @@ exports.isAdmin = email => config.ADMIN_EMAILS.includes(email);
 exports.getStatsCacheTime = total => {
   switch (true) {
     case total > 5000 && total < 20000:
-      return ms('1 hour');
+      return ms('1 hour') / 1000;
 
     case total < 40000:
-      return ms('3 hours');
+      return ms('3 hours') / 1000;
 
     case total > 40000:
-      return ms('6 hours');
+      return ms('6 hours') / 1000;
 
     default:
-      return ms('15 minutes');
+      return ms('15 minutes') / 1000;
   }
 };