According to the Issue, Configure user bank accounts in the cloud app #38. It's necessary an endpoint to update the user IBAN list as well to get it. According to the API documentation, creating two new endpoints is necessary. One is for getting the IBAN list, and another is for adding a new IBAN.
Since all the logic was coupled in the user_auth.py (to receive the event from lambda and create the login token) and we would increase it, I have split the logic into 3 new files: user_service, user_login, and user_persistence.
user_service: responsible for receiving the event and respond the lambda call.
user_login: responsible for checking the user password and creating the user token.
user_persistence: abstraction for getting the user from DynamoDB and updating the user IBAN list.
THE UNIT TEST FOR THE user_service.py IS STILL ON GOING
According to the Issue, Configure user bank accounts in the cloud app #38. It's necessary an endpoint to update the user IBAN list as well to get it. According to the API documentation, creating two new endpoints is necessary. One is for getting the IBAN list, and another is for adding a new IBAN.
Since all the logic was coupled in the user_auth.py (to receive the event from lambda and create the login token) and we would increase it, I have split the logic into 3 new files: user_service, user_login, and user_persistence.
THE UNIT TEST FOR THE user_service.py IS STILL ON GOING