From 243722df934563b4bea4e8881e2a5adabb5be16c Mon Sep 17 00:00:00 2001 From: Tom Bloor Date: Thu, 20 Jul 2017 17:34:33 +0100 Subject: [PATCH] Fix issue with login error fixes #9 --- lib/Pear/LocalLoop/Controller/Api/Auth.pm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/Pear/LocalLoop/Controller/Api/Auth.pm b/lib/Pear/LocalLoop/Controller/Api/Auth.pm index 4642bba..3592cbb 100644 --- a/lib/Pear/LocalLoop/Controller/Api/Auth.pm +++ b/lib/Pear/LocalLoop/Controller/Api/Auth.pm @@ -85,15 +85,14 @@ sub post_login { session_key => $session_key, }); } - } else { - return $c->render( - json => { - success => Mojo::JSON->false, - message => 'Email or password is invalid.', - }, - status => 401 - ); } + return $c->render( + json => { + success => Mojo::JSON->false, + message => 'Email or password is invalid.', + }, + status => 401 + ); } sub post_logout {