aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Renard 2019-09-11 15:41:04 -0300
committerLibravatar Renard 2019-09-11 15:41:04 -0300
commitc8ee5b58665e7509654df2f52772349a3521f20f (patch)
treef428ea0b385d16f6877a6c7f39afc587d6bcddf4
parent988f1e5f0f3b1f194c67de6dafd1b5feb23da3f3 (diff)
downloadweabot-c8ee5b58665e7509654df2f52772349a3521f20f.tar.gz
weabot-c8ee5b58665e7509654df2f52772349a3521f20f.tar.xz
weabot-c8ee5b58665e7509654df2f52772349a3521f20f.zip
API: Blotter
-rw-r--r--cgi/api.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cgi/api.py b/cgi/api.py
index 19122d0..40fb5c6 100644
--- a/cgi/api.py
+++ b/cgi/api.py
@@ -385,6 +385,9 @@ def api_process(self, path_split):
threads = getNewThreads(limit)
values['threads'] = threads
+ elif method == "blotter":
+ latest_news = FetchAll("SELECT `timestamp`, `message`, `timestamp_formatted` FROM `news` WHERE `type` = '2' ORDER BY `timestamp` DESC LIMIT " + str(Settings.HOME_NEWS))
+ values["news"] = latest_news
else:
raise APIError, "Invalid method"