aboutsummaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
authorLibravatar Renard 2020-07-31 20:03:55 -0400
committerLibravatar Renard 2020-07-31 20:03:55 -0400
commit95ceaf106ed9887ac9ca0899a970023b4c26cd11 (patch)
tree01f2781fe745c5004300e35010c8941949b525ff /cgi
parentd8a368c0a4d6dacb382c8ebb0de50da39b04e94e (diff)
downloadweabot-95ceaf106ed9887ac9ca0899a970023b4c26cd11.tar.gz
weabot-95ceaf106ed9887ac9ca0899a970023b4c26cd11.tar.xz
weabot-95ceaf106ed9887ac9ca0899a970023b4c26cd11.zip
Api Fix
Diffstat (limited to 'cgi')
-rw-r--r--cgi/modapi.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cgi/modapi.py b/cgi/modapi.py
index 19bf5fd..11fbf1e 100644
--- a/cgi/modapi.py
+++ b/cgi/modapi.py
@@ -76,16 +76,16 @@ def api_process(self, path_split):
"SELECT * FROM `news` WHERE type = 1 ORDER BY `timestamp` DESC")
values['news'] = news
elif method == 'post':
- board = formdata.get("board")
+ board = setBoard(formdata.get("board"))
if 'id' in formdata.keys():
id = formdata.get('id')
post = FetchOne("SELECT `id`, `boardid`, `parentid`,`timestamp`, `name`, `tripcode`, `email` ,`subject`,`message`,`file`,`thumb`, INET6_NTOA(`ip`) as ip,`IS_DELETED` AS `deleted`, `bumped`, `last`, `locked` FROM `posts` FROM `posts` WHERE `id` = '" +
- _mysql.escape_string(id) + "' AND board = '" + _mysql.escape_string(board) + "'")
+ _mysql.escape_string(id) + "' AND board = '" + _mysql.escape_string(board["id"]) + "'")
values['post'] = post
if 'parentid' in formdata.keys():
id = formdata.get('parentid')
post = FetchAll("SELECT `id`, `boardid`, `parentid`,`timestamp`, `name`, `tripcode`, `email` ,`subject`,`message`,`file`,`thumb`, INET6_NTOA(`ip`) as ip,`IS_DELETED` AS `deleted`, `bumped`, `last`, `locked` FROM `posts` FROM `posts` WHERE `parentid` = '" +
- _mysql.escape_string(id) + "' AND board = '" + _mysql.escape_string(board) + "'")
+ _mysql.escape_string(id) + "' AND board = '" + _mysql.escape_string(board["id"]) + "'")
values['posts'] = post
elif method == 'reports':
if len(path_split) > 3: