diff options
author | Renard | 2019-09-23 17:52:07 -0300 |
---|---|---|
committer | Renard | 2019-09-24 19:11:22 -0300 |
commit | 90e8e60ca131f4366c68b9d5759f5179092e20da (patch) | |
tree | a77f80af0743f30927aa9c3c2aa0f42632b33c28 /cgi | |
parent | 3ff6f43f51d813280d54fd91121c14c4819b5b84 (diff) | |
download | weabot-90e8e60ca131f4366c68b9d5759f5179092e20da.tar.gz weabot-90e8e60ca131f4366c68b9d5759f5179092e20da.tar.xz weabot-90e8e60ca131f4366c68b9d5759f5179092e20da.zip |
API: make_post returns post id
Diffstat (limited to 'cgi')
-rw-r--r-- | cgi/api.py | 3 | ||||
-rwxr-xr-x | cgi/weabot.py | 4 |
2 files changed, 4 insertions, 3 deletions
@@ -367,10 +367,11 @@ def api_process(self, path_split): mobile = ("mobile" in formdata.keys()) # call post function - (post_url, ttaken) = self.make_post(ip, boarddir, parent, trap1, trap2, name, email, subject, message, file, file_original, spoil, oek_file, password, noimage, mobile) + (post_url, ttaken, postid) = self.make_post(ip, boarddir, parent, trap1, trap2, name, email, subject, message, file, file_original, spoil, oek_file, password, noimage, mobile) values['post_url'] = post_url values['time_taken'] = ttaken + values['post_id'] = postid elif method == 'newThreads': data_limit = formdata.get('limit') limit = 30 diff --git a/cgi/weabot.py b/cgi/weabot.py index 64cb890..29770f4 100755 --- a/cgi/weabot.py +++ b/cgi/weabot.py @@ -150,7 +150,7 @@ class weabot(object): mobile = ("mobile" in self.formdata.keys()) # call post function - (post_url, ttaken) = self.make_post(ip, boarddir, parent, trap1, trap2, name, email, subject, message, file, file_original, spoil, oek_file, password, noimage, mobile) + (post_url, ttaken, unused) = self.make_post(ip, boarddir, parent, trap1, trap2, name, email, subject, message, file, file_original, spoil, oek_file, password, noimage, mobile) # make redirect self.output += make_redirect(post_url, ttaken) @@ -793,7 +793,7 @@ class weabot(object): hook_url = make_url(postid, post, parent_post or post, True, False) discord_hook(post, hook_url) - return (post_url, ttaken) + return (post_url, ttaken, postid) def delete_post(self, boarddir, postid, imageonly, password, mobile=False): OpenDb() |