diff options
author | James Taylor <user234683@users.noreply.github.com> | 2019-01-05 01:57:50 -0800 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2019-01-05 01:57:50 -0800 |
commit | 28270a9ce83c4cf53a950de913e3e635c9ac1139 (patch) | |
tree | 2bb01c1d0f5ec0a7342523c6afbe7065ba67e144 /youtube/youtube.py | |
parent | 60df0aec6d76ddda5a62ca855857f6e6573589fa (diff) | |
download | yt-local-28270a9ce83c4cf53a950de913e3e635c9ac1139.tar.lz yt-local-28270a9ce83c4cf53a950de913e3e635c9ac1139.tar.xz yt-local-28270a9ce83c4cf53a950de913e3e635c9ac1139.zip |
WSGI for /delete_comment (POST request)
Diffstat (limited to 'youtube/youtube.py')
-rw-r--r-- | youtube/youtube.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/youtube/youtube.py b/youtube/youtube.py index b9632c6..d5a64ab 100644 --- a/youtube/youtube.py +++ b/youtube/youtube.py @@ -21,6 +21,7 @@ get_handlers = { post_handlers = { 'edit_playlist': local_playlist.edit_playlist, 'login': accounts.add_account, + 'delete_comment': post_comment.delete_comment, } def youtube(env, start_response): @@ -123,14 +124,6 @@ def youtube(env, start_response): start_response('303 See Other', (('Location', common.URL_ORIGIN + '/comments?ctoken=' + comments.make_comment_ctoken(video_id, sort=1)),) ) return '' - elif path == "/delete_comment": - parameters = urllib.parse.parse_qs(query_string) - code = post_comment.delete_comment(parameters, fields) - if code == "SUCCESS": - start_response('303 See Other', (('Location', common.URL_ORIGIN + '/comment_delete_success'),) ) - else: - start_response('303 See Other', (('Location', common.URL_ORIGIN + '/comment_delete_fail'),) ) - else: start_response('404 Not Found', ()) return b'404 Not Found' |