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

🧹 When returning an empty succes, use 204 instead of 200 #5455

Merged
merged 12 commits into from
Apr 25, 2024

Conversation

Annelein
Copy link
Collaborator

Fixes a part of #4029

How to test

  1. All unittests should pass
  2. Check if all new returns are correct

@Annelein Annelein changed the title 🧹 Succes 200 to 204 🧹 When returning an empty succes, use 204 instead of 200 Apr 23, 2024
@Annelein Annelein marked this pull request as ready for review April 24, 2024 11:33
app.py Outdated
@@ -2265,7 +2265,7 @@ def change_language():
# Remove 'keyword_lang' from session, it will automatically be renegotiated from 'lang'
# on the next page load.
session.pop('keyword_lang')
return jsonify({'succes': 200})
return jsonify({'succes': 204})
Copy link
Member

Choose a reason for hiding this comment

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

Why not using make_response her too? Since you've already changed it in other places

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because it would give an unknown error..

Copy link
Contributor

mergify bot commented Apr 25, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 396817d into main Apr 25, 2024
12 checks passed
@mergify mergify bot deleted the succes-200-to-204 branch April 25, 2024 18:31
Copy link
Contributor

mergify bot commented Apr 25, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants