fix missing loggedin_counter and loggedout_counter

pull/24/head
justcool393 2022-11-26 18:55:26 -06:00 committed by geese_suck
parent b0e0be86a1
commit 45c232d3b2
Signed by: geese_suck
GPG Key ID: 4D09E4B0A7264746
1 changed files with 4 additions and 1 deletions

View File

@ -14,7 +14,10 @@ from files.__main__ import app, cache, db_session, limiter
def calc_users(v):
if not g.is_api_or_xhr: return
if g.is_api_or_xhr:
g.loggedin_counter = 0
g.loggedout_counter = 0
return ''
loggedin = cache.get(f'{SITE}_loggedin') or {}
loggedout = cache.get(f'{SITE}_loggedout') or {}
timestamp = int(time.time())