mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
refactor: remove unused code
This commit is contained in:
parent
5c91e0bef3
commit
5c2d0a829a
@ -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/",
|
||||
|
@ -41,7 +41,6 @@ from .cycle import CycleViewSet, CycleIssueViewSet, BulkAssignIssuesToCycleEndpo
|
||||
from .asset import FileAssetEndpoint
|
||||
from .issue import (
|
||||
IssueViewSet,
|
||||
UserIssuesEndpoint,
|
||||
WorkSpaceIssuesEndpoint,
|
||||
IssueActivityEndpoint,
|
||||
IssueCommentViewSet,
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user