-
Notifications
You must be signed in to change notification settings - Fork 289
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 make_response incorrectly sending text
instead of JSON
#5599
Conversation
text
instead of JSON
We've found another error, I will solve this tomorrow! |
@Annelein I fixed the achievements issue! Can you check again please? |
@jpelay I've changed some 204's to 200's, because the Only comment left is about **btw I can also add a check in the frontend for response and then make it a 204 instead? |
Perfect, thanks!
What's the comment? |
website/classes.py
Outdated
if achievement: | ||
utils.add_pending_achievement({"achievement": achievement}) | ||
return make_response({"id": Class["id"]}, 200) | ||
response_body = {"id": Class["id"]} |
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.
Do you think response_body is better? Just wondering, I'd prefer response because it's shorter :)))
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.
I prefer response too! But in some functions there's a response
variable already set, and I prefer to make a new one.
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.
true! But not for this function right? And what about the others?
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.
You're right, just renamed them :D
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). |
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). |
#5558 Introduced an error where some calls where expecting a JSON, and got text instead. I checked the places where this happened and fix the calls.
If I'm missing some, please add them 😄
How to test
Perform the following:
And all of them should show the success modal!
Also:
Fixes #5550