-
-
Notifications
You must be signed in to change notification settings - Fork 775
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 AnonymousUser post on status #9261
Conversation
response['status'] = 401 | ||
response['message'] = 'Not logged in!' | ||
print('here', response) | ||
return JsonResponse(status=response['status'], data={'status': 401,'message':response['message']}) |
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.
can we just do return JsonResponse(response, status=401)
?
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.
how it works is status 401 http status and data.status json pattern, not sure I get your feedback, could be like:
return JsonResponse(status=401, data={'status': 401,'message':response['message']})
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.
Yes that cleaner
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.
Remove print statement :-)
Description
Refers/Fixes
fix https://gitcoin.atlassian.net/browse/GITC-166
Testing