Create a router map for the user service API endpoints. This will lead the code to be more clean, readble and easy to maintain while the code gets bigger.
Basically change what is now:
try:
if resource == "/users/{userId}/login" and http_method == "POST":
...
elif resource == "/users/{userId}/bank-accounts" and http_method == "GET":
....
elif (
resource == "/users/{userId}/bank-accounts/{iban}" and http_method == "PUT"
):
...
Create a router map for the user service API endpoints. This will lead the code to be more clean, readble and easy to maintain while the code gets bigger.
Basically change what is now:
To something like: