aboutsummaryrefslogtreecommitdiff
path: root/app/utils.py
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-07-11 02:32:17 +0100
committerrubenwardy <rw@rubenwardy.com>2020-07-11 02:32:17 +0100
commita4dd4f04293b6ad6dab5d3dc0a4c52a3290b4394 (patch)
tree8e56f86e0318bd41266ad4cf9178269fe6da4dbb /app/utils.py
parentbf927c50f00bd15c7bc1765b7d5fb0c6a6abeb86 (diff)
downloadcheatdb-a4dd4f04293b6ad6dab5d3dc0a4c52a3290b4394.tar.xz
Add audit log
Diffstat (limited to 'app/utils.py')
-rw-r--r--app/utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/utils.py b/app/utils.py
index 5f47f75..0f5a916 100644
--- a/app/utils.py
+++ b/app/utils.py
@@ -204,6 +204,11 @@ def addNotification(target, causer, title, url, package=None):
db.session.add(notif)
+def addAuditLog(severity, causer, title, url, package=None):
+ entry = AuditLogEntry(causer, severity, title, url, package)
+ db.session.add(entry)
+
+
def clearNotifications(url):
if current_user.is_authenticated:
Notification.query.filter_by(user=current_user, url=url).delete()