aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/youtube.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2019-01-05 01:47:54 -0800
committerJames Taylor <user234683@users.noreply.github.com>2019-01-05 01:47:54 -0800
commit60df0aec6d76ddda5a62ca855857f6e6573589fa (patch)
tree02f6eb012b98654587d5b5d9cf3049e67466bf73 /youtube/youtube.py
parent31a60602de1a587a6e84b6bca340fb71241a2187 (diff)
downloadyt-local-60df0aec6d76ddda5a62ca855857f6e6573589fa.tar.lz
yt-local-60df0aec6d76ddda5a62ca855857f6e6573589fa.tar.xz
yt-local-60df0aec6d76ddda5a62ca855857f6e6573589fa.zip
WSGI for logging in (POST request)
Diffstat (limited to 'youtube/youtube.py')
-rw-r--r--youtube/youtube.py21
1 files changed, 1 insertions, 20 deletions
diff --git a/youtube/youtube.py b/youtube/youtube.py
index e22ef52..b9632c6 100644
--- a/youtube/youtube.py
+++ b/youtube/youtube.py
@@ -20,8 +20,7 @@ get_handlers = {
}
post_handlers = {
'edit_playlist': local_playlist.edit_playlist,
-
-
+ 'login': accounts.add_account,
}
def youtube(env, start_response):
@@ -132,24 +131,6 @@ def youtube(env, start_response):
else:
start_response('303 See Other', (('Location', common.URL_ORIGIN + '/comment_delete_fail'),) )
- elif path == "/login":
- if 'save' in fields and fields['save'][0] == "on":
- save_account = True
- else:
- save_account = False
-
- if 'use_tor' in fields and fields['use_tor'][0] == "on":
- use_tor = True
- else:
- use_tor = False
-
- if accounts.add_account(fields['username'][0], fields['password'][0], save_account, use_tor ):
- start_response('200 OK', () )
- return b'Account successfully added'
- else:
- start_response('200 OK', () )
- return b'Failed to add account'
-
else:
start_response('404 Not Found', ())
return b'404 Not Found'