aboutsummaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
authorLibravatar Renard 2020-07-21 22:18:43 -0400
committerLibravatar Renard 2020-07-21 22:18:43 -0400
commit5a9699fed69e7c302d6363d2a81039477554c739 (patch)
tree17b57dccff1d86ae54eada4574f8d304a2e66b59 /cgi
parent7cf693695038a3377b4ac03e409bdac7ecf84d93 (diff)
downloadweabot-5a9699fed69e7c302d6363d2a81039477554c739.tar.gz
weabot-5a9699fed69e7c302d6363d2a81039477554c739.tar.xz
weabot-5a9699fed69e7c302d6363d2a81039477554c739.zip
Mod API: Reports
Diffstat (limited to 'cgi')
-rw-r--r--cgi/modapi.py5
1 files changed, 5 insertions, 0 deletions
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')