From 169c79650e2af8f673b4880fd05a6b38c321bd83 Mon Sep 17 00:00:00 2001 From: Peter Yefi Date: Tue, 17 Jan 2023 19:53:46 -0500 Subject: [PATCH] Included message for wrong authentication --- persistence/repositories/user_repo.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/persistence/repositories/user_repo.py b/persistence/repositories/user_repo.py index 6abda5bf..585628a9 100644 --- a/persistence/repositories/user_repo.py +++ b/persistence/repositories/user_repo.py @@ -100,6 +100,8 @@ class UserRepo(BaseRepo): if user: if Auth.check_password(password, user[0].password): return user + else: + return {'message': 'Wrong email/password combination'} return {'message': 'user not found'} except SQLAlchemyError as err: logger.error(f'Error while fetching user by email: {err}')