-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix getting client_id and auth_url for login endpoint #2
base: master
Are you sure you want to change the base?
Conversation
AzamatKomaev
commented
Sep 18, 2024
- JSON schema of login endpoint was changed. Now it does not have "legacy" key. Use "wso" instead.
- Temporarily changed docker build settings in docker-compose.yaml for debugging application.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request! I haven't tested it yet, and I don't know when I will, but anyway, here are some changes that will make this PR better.
client_id = r.json()["wso"]["clientId"] | ||
auth_url = r.json()["wso"]["loginUrl"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't decode the response twice.
client_id = r.json()["wso"]["clientId"] | |
auth_url = r.json()["wso"]["loginUrl"] | |
data = r.json()["wso"] | |
auth_url = data["loginUrl"] | |
client_id = data["clientId"] |
# image: ghcr.io/amodeus-app/amodeus-api | ||
build: | ||
context: . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave it as-is for a while. I'll return to the project some day and rewrite the docker compose file entirely, also adjusting the API itself to the changes.
# image: ghcr.io/amodeus-app/amodeus-api | |
build: | |
context: . | |
image: ghcr.io/amodeus-app/amodeus-api |
I have checked changes, and it's working good with these changes |