mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: response status for project views update (#2111)
* chore: response status for project views update * dev: remove 200 OK response from empty contents
This commit is contained in:
parent
5989f2476a
commit
8ba482bc9c
@ -482,7 +482,7 @@ class UserProjectInvitationsViewset(BaseViewSet):
|
|||||||
# Delete joined project invites
|
# Delete joined project invites
|
||||||
project_invitations.delete()
|
project_invitations.delete()
|
||||||
|
|
||||||
return Response(status=status.HTTP_200_OK)
|
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
capture_exception(e)
|
capture_exception(e)
|
||||||
return Response(
|
return Response(
|
||||||
@ -924,8 +924,7 @@ class ProjectUserViewsEndpoint(BaseAPIView):
|
|||||||
|
|
||||||
project_member.save()
|
project_member.save()
|
||||||
|
|
||||||
return Response(status=status.HTTP_200_OK)
|
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||||
|
|
||||||
except Project.DoesNotExist:
|
except Project.DoesNotExist:
|
||||||
return Response(
|
return Response(
|
||||||
{"error": "The requested resource does not exists"},
|
{"error": "The requested resource does not exists"},
|
||||||
|
@ -532,7 +532,7 @@ class UserWorkspaceInvitationsEndpoint(BaseViewSet):
|
|||||||
# Delete joined workspace invites
|
# Delete joined workspace invites
|
||||||
workspace_invitations.delete()
|
workspace_invitations.delete()
|
||||||
|
|
||||||
return Response(status=status.HTTP_200_OK)
|
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
capture_exception(e)
|
capture_exception(e)
|
||||||
return Response(
|
return Response(
|
||||||
@ -846,7 +846,7 @@ class WorkspaceMemberUserViewsEndpoint(BaseAPIView):
|
|||||||
workspace_member.view_props = request.data.get("view_props", {})
|
workspace_member.view_props = request.data.get("view_props", {})
|
||||||
workspace_member.save()
|
workspace_member.save()
|
||||||
|
|
||||||
return Response(status=status.HTTP_200_OK)
|
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||||
except WorkspaceMember.DoesNotExist:
|
except WorkspaceMember.DoesNotExist:
|
||||||
return Response(
|
return Response(
|
||||||
{"error": "User not a member of workspace"},
|
{"error": "User not a member of workspace"},
|
||||||
|
Loading…
Reference in New Issue
Block a user