From 57cf3bd7d68a760916142ea4ad14c025767a9515 Mon Sep 17 00:00:00 2001
From: Thomas L <tom@dl6tom.de>
Date: Sat, 14 Apr 2018 17:34:43 +0200
Subject: [PATCH] no return needed, redirect throws

---
 frontend.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/frontend.py b/frontend.py
index 585af01..0c0c0eb 100755
--- a/frontend.py
+++ b/frontend.py
@@ -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')