From 5a9699fed69e7c302d6363d2a81039477554c739 Mon Sep 17 00:00:00 2001 From: Renard Date: Tue, 21 Jul 2020 22:18:43 -0400 Subject: Mod API: Reports --- cgi/modapi.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cgi/modapi.py b/cgi/modapi.py index 82770ec..00b4beb 100644 --- a/cgi/modapi.py +++ b/cgi/modapi.py @@ -60,6 +60,11 @@ def api_process(self, path_split): news = FetchAll( "SELECT * FROM `news` WHERE type = 1 ORDER BY `timestamp` DESC") values['news'] = news + elif method == 'reports': + reports = FetchAll( + "SELECT * FROM `reports` ORDER BY `timestamp` DESC") + values['reports'] = reports + values['keys'] = reports[0].keys() elif method == 'login': # testing username = formdata.get('username') -- cgit v1.2.1-18-gbd029