diff --git a/apiserver/plane/api/urls.py b/apiserver/plane/api/urls.py index 4d8fd7afe..a88744b4a 100644 --- a/apiserver/plane/api/urls.py +++ b/apiserver/plane/api/urls.py @@ -79,7 +79,6 @@ from plane.api.views import ( ## End Issues # States StateViewSet, - StateDeleteIssueCheckEndpoint, ## End States # Estimates ProjectEstimatePointEndpoint, @@ -509,11 +508,6 @@ urlpatterns = [ ), name="project-state", ), - path( - "workspaces//projects//states//", - StateDeleteIssueCheckEndpoint.as_view(), - name="state-delete-check", - ), # End States ## # Estimates path( diff --git a/apiserver/plane/api/views/__init__.py b/apiserver/plane/api/views/__init__.py index 507d07816..536fd83bf 100644 --- a/apiserver/plane/api/views/__init__.py +++ b/apiserver/plane/api/views/__init__.py @@ -42,7 +42,7 @@ from .workspace import ( UserWorkspaceDashboardEndpoint, WorkspaceThemeViewSet, ) -from .state import StateViewSet, StateDeleteIssueCheckEndpoint +from .state import StateViewSet from .shortcut import ShortCutViewSet from .view import IssueViewViewSet, ViewIssuesEndpoint, IssueViewFavoriteViewSet from .cycle import ( diff --git a/apiserver/plane/api/views/state.py b/apiserver/plane/api/views/state.py index f1e409e14..b217a662d 100644 --- a/apiserver/plane/api/views/state.py +++ b/apiserver/plane/api/views/state.py @@ -103,22 +103,3 @@ class StateViewSet(BaseViewSet): return Response(status=status.HTTP_204_NO_CONTENT) except State.DoesNotExist: return Response({"error": "State does not exists"}, status=status.HTTP_404) - - -class StateDeleteIssueCheckEndpoint(BaseAPIView): - permission_classes = [ - ProjectEntityPermission, - ] - - def get(self, request, slug, project_id, pk): - try: - issue_count = Issue.objects.filter( - state=pk, workspace__slug=slug, project_id=project_id - ).count() - return Response({"issue_count": issue_count}, 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_400_BAD_REQUEST, - )