From 521a821d8a91dd62d36e60e17cbabab48e017365 Mon Sep 17 00:00:00 2001 From: Renard Date: Tue, 21 Jul 2020 22:29:29 -0400 Subject: Mod API: Logs --- cgi/modapi.py | 3 +++ 1 file changed, 3 insertions(+) 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') -- cgit v1.2.1-18-gbd029