Included message for wrong authentication

This commit is contained in:
Peter Yefi 2023-01-17 19:53:46 -05:00
parent 708075fd3c
commit 169c79650e

View File

@ -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}')