From 5c2d0a829aaab9c4d600636f800896e637d6a0fb Mon Sep 17 00:00:00 2001 From: pablohashescobar Date: Tue, 13 Dec 2022 23:46:51 +0530 Subject: [PATCH] refactor: remove unused code --- apiserver/plane/api/urls.py | 7 ------- apiserver/plane/api/views/__init__.py | 1 - apiserver/plane/api/views/issue.py | 13 ------------- 3 files changed, 21 deletions(-) diff --git a/apiserver/plane/api/urls.py b/apiserver/plane/api/urls.py index 3a7e02f62..96244a367 100644 --- a/apiserver/plane/api/urls.py +++ b/apiserver/plane/api/urls.py @@ -37,7 +37,6 @@ from plane.api.views import ( CycleViewSet, FileAssetEndpoint, IssueViewSet, - UserIssuesEndpoint, WorkSpaceIssuesEndpoint, IssueActivityEndpoint, IssueCommentViewSet, @@ -145,12 +144,6 @@ urlpatterns = [ UserProjectInvitationsViewset.as_view({"get": "list", "post": "create"}), name="user-project-invitaions", ), - # user issues - path( - "users/me/issues/", - UserIssuesEndpoint.as_view(), - name="user-issues", - ), ## Workspaces ## path( "workspaces/", diff --git a/apiserver/plane/api/views/__init__.py b/apiserver/plane/api/views/__init__.py index c2efaa707..a4d9021c6 100644 --- a/apiserver/plane/api/views/__init__.py +++ b/apiserver/plane/api/views/__init__.py @@ -41,7 +41,6 @@ from .cycle import CycleViewSet, CycleIssueViewSet, BulkAssignIssuesToCycleEndpo from .asset import FileAssetEndpoint from .issue import ( IssueViewSet, - UserIssuesEndpoint, WorkSpaceIssuesEndpoint, IssueActivityEndpoint, IssueCommentViewSet, diff --git a/apiserver/plane/api/views/issue.py b/apiserver/plane/api/views/issue.py index 530685a0f..9a7d69c83 100644 --- a/apiserver/plane/api/views/issue.py +++ b/apiserver/plane/api/views/issue.py @@ -160,19 +160,6 @@ class IssueViewSet(BaseViewSet): ) -class UserIssuesEndpoint(BaseAPIView): - def get(self, request): - try: - issues = Issue.objects.filter(assignees__in=[request.user]) - serializer = IssueSerializer(issues, many=True) - return Response(serializer.data, status=status.HTTP_200_OK) - except Exception as e: - capture_exception(e) - return Response( - {"error": "Something went wrong please try again later"}, - status=status.HTTP_500_INTERNAL_SERVER_ERROR, - ) - class UserWorkSpaceIssues(BaseAPIView): def get(self, request, slug): try: