aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Renard 2020-07-21 22:29:29 -0400
committerLibravatar Renard 2020-07-21 22:29:29 -0400
commit521a821d8a91dd62d36e60e17cbabab48e017365 (patch)
tree9dfce2edb88e350e602c7400086f5dd76b7c77f2
parent126fd50f95bca07514d7cdebe6d4bfc5a585693b (diff)
downloadweabot-521a821d8a91dd62d36e60e17cbabab48e017365.tar.gz
weabot-521a821d8a91dd62d36e60e17cbabab48e017365.tar.xz
weabot-521a821d8a91dd62d36e60e17cbabab48e017365.zip
Mod API: Logs
-rw-r--r--cgi/modapi.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cgi/modapi.py b/cgi/modapi.py
index 0d082e9..a3465e1 100644
--- a/cgi/modapi.py
+++ b/cgi/modapi.py
@@ -64,6 +64,9 @@ def api_process(self, path_split):
reports = FetchAll(
"SELECT id, timestamp, timestamp_formatted, postid, parentid, link, board, INET6_NTOA(ip) AS ip, reason, INET6_NTOA(repip) AS repip FROM `reports` ORDER BY `timestamp` DESC")
values['reports'] = reports
+ elif method == 'logs':
+ logs = FetchAll("SELECT * FROM `logs` ORDER BY `timestamp` DESC")
+ values['logs'] = logs
elif method == 'login':
# testing
username = formdata.get('username')