mirror of
https://github.com/marcus-alicia/iRedAdmin-Pro-SQL.git
synced 2026-05-26 23:19:45 +00:00
Add files via upload
This commit is contained in:
0
libs/f2b/__init__.py
Normal file
0
libs/f2b/__init__.py
Normal file
17
libs/f2b/log.py
Normal file
17
libs/f2b/log.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import web
|
||||
|
||||
from controllers import decorators
|
||||
from libs.logger import logger
|
||||
|
||||
|
||||
@decorators.require_global_admin
|
||||
def num_banned() -> int:
|
||||
total = 0
|
||||
|
||||
try:
|
||||
_qr = web.conn_f2b.select("banned", what="COUNT(id) AS total")
|
||||
total = _qr[0]['total']
|
||||
except Exception as e:
|
||||
logger.error(e)
|
||||
|
||||
return total
|
||||
Reference in New Issue
Block a user