no return needed, redirect throws

This commit is contained in:
Thomas L 2018-04-14 17:34:43 +02:00
parent 1af14a5db4
commit 57cf3bd7d6

View file

@ -54,7 +54,7 @@ def confirm(token):
# create db-entry
if db.confirm(token):
# :todo show info "Account creation successful."
return redirect('/settings')
redirect('/settings')
return dict(error='Email confirmation failed.')
@ -65,7 +65,7 @@ def login_post():
try:
if db.by_email(request.forms.get('email', '')) \
.check_password(request.forms.get('pass', '')):
return redirect('/settings')
redirect('/settings')
except AttributeError:
pass
return dict(error='Authentication failed.')
@ -92,7 +92,7 @@ def logout():
# clear auth cookie
response.set_cookie('uid', '', expires=0, path="/")
# :todo show info "Logout successful."
return redirect('/')
redirect('/')
@get('/login/twitter')
@ -112,7 +112,7 @@ def login_twitter(user):
exc_info=True)
return dict(error="Failed to get request token.")
user.save_request_token(auth.request_token)
return bottle.redirect(redirect_url)
redirect(redirect_url)
@get('/login/twitter/callback')
@ -131,7 +131,7 @@ def twitter_callback(user):
"oauth_token_secret": verifier}
auth.get_access_token(verifier)
user.save_twitter_token(auth.access_token, auth.access_token_secret)
return bottle.redirect("/settings")
redirect("/settings")
@post('/login/mastodon')