-
Notifications
You must be signed in to change notification settings - Fork 256
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
Endpoint analyse/ fixed for read-only users #817
Conversation
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.
LGTM
Once approved I will make a PR at frontend to change endpoint to GET. So these PR at frontend and backend can be merged at same time @vigneshhari |
@@ -45,22 +45,20 @@ def get_serializer(self, *args, **kwargs): | |||
).id | |||
return super().get_serializer(*args, **kwargs) | |||
|
|||
@action(methods=["POST"], detail=False) |
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.
This endpoint should only be performed over POST to ensure that the filters do not exceed the max allowed character limit in GET, change the permission instead of the HTTP method, which means no changes in FE as well.
Issue Fixed
fixes #813
Updates
The bug is because analyze is a post request
and DailyRound model doesn't allow POST,PUT,PATCH by read-only users
Converting analyze endpoint to GET request fixed the issue
Demo