Skip to content
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 Api Representation for media #173

Merged
merged 9 commits into from
Dec 12, 2022
Merged

Fix Api Representation for media #173

merged 9 commits into from
Dec 12, 2022

Conversation

quaxsze
Copy link
Contributor

@quaxsze quaxsze commented Nov 29, 2022

Copy link
Contributor

@maudetes maudetes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget the changelog?

udata_front/api.py Outdated Show resolved Hide resolved
udata_front/api.py Show resolved Hide resolved
Copy link
Contributor

@maudetes maudetes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work perfectly, but I'm making a small suggestion

udata_front/api.py Outdated Show resolved Hide resolved
@quaxsze
Copy link
Contributor Author

quaxsze commented Dec 6, 2022

@nicolaskempf57 We remove the api.representation line for media. The whole APIv2 was passing through it.
Instead we use the get argument to know which header to include in the response. Does it look okey to you?

@nicolaskempf57
Copy link
Contributor

@nicolaskempf57 We remove the api.representation line for media. The whole APIv2 was passing through it. Instead we use the get argument to know which header to include in the response. Does it look okey to you?

Yes ! This was done because the captcha calls doesn't include any Accept header so flask-rest-x treats it as application/json and that prevent it for sending the response as bytes.

Copy link
Contributor

@maudetes maudetes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! 👏

Don't forget to update the tests

@quaxsze quaxsze merged commit a40c61f into master Dec 12, 2022
@quaxsze quaxsze deleted the fixApiRepresentation branch December 12, 2022 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Résoudre erreurs sur les endpoints de l'apiv2
3 participants