mirror of
https://github.com/DarkflameUniverse/NexusDashboard.git
synced 2025-10-14 19:18:01 +00:00
Added Audit logs for everything
This commit is contained in:
@@ -13,7 +13,7 @@ from flask_apscheduler import APScheduler
|
||||
from app.luclient import query_cdclient, register_luclient_jinja_helpers
|
||||
|
||||
from app.commands import init_db, init_accounts, load_property, gen_image_cache, gen_model_cache
|
||||
from app.models import Account, AccountInvitation
|
||||
from app.models import Account, AccountInvitation, AuditLog
|
||||
|
||||
import logging
|
||||
from logging.handlers import RotatingFileHandler
|
||||
@@ -245,3 +245,9 @@ def gm_level(gm_level):
|
||||
return func(*args, **kwargs)
|
||||
return wrapper
|
||||
return decorator
|
||||
|
||||
def log_audit(message):
|
||||
AuditLog(
|
||||
account_id=current_user.id,
|
||||
action=message
|
||||
).save()
|
||||
|
Reference in New Issue
Block a user