forked from github/plane
refactor: remove unused code
This commit is contained in:
parent
5c91e0bef3
commit
5c2d0a829a
@ -37,7 +37,6 @@ from plane.api.views import (
|
|||||||
CycleViewSet,
|
CycleViewSet,
|
||||||
FileAssetEndpoint,
|
FileAssetEndpoint,
|
||||||
IssueViewSet,
|
IssueViewSet,
|
||||||
UserIssuesEndpoint,
|
|
||||||
WorkSpaceIssuesEndpoint,
|
WorkSpaceIssuesEndpoint,
|
||||||
IssueActivityEndpoint,
|
IssueActivityEndpoint,
|
||||||
IssueCommentViewSet,
|
IssueCommentViewSet,
|
||||||
@ -145,12 +144,6 @@ urlpatterns = [
|
|||||||
UserProjectInvitationsViewset.as_view({"get": "list", "post": "create"}),
|
UserProjectInvitationsViewset.as_view({"get": "list", "post": "create"}),
|
||||||
name="user-project-invitaions",
|
name="user-project-invitaions",
|
||||||
),
|
),
|
||||||
# user issues
|
|
||||||
path(
|
|
||||||
"users/me/issues/",
|
|
||||||
UserIssuesEndpoint.as_view(),
|
|
||||||
name="user-issues",
|
|
||||||
),
|
|
||||||
## Workspaces ##
|
## Workspaces ##
|
||||||
path(
|
path(
|
||||||
"workspaces/",
|
"workspaces/",
|
||||||
|
@ -41,7 +41,6 @@ from .cycle import CycleViewSet, CycleIssueViewSet, BulkAssignIssuesToCycleEndpo
|
|||||||
from .asset import FileAssetEndpoint
|
from .asset import FileAssetEndpoint
|
||||||
from .issue import (
|
from .issue import (
|
||||||
IssueViewSet,
|
IssueViewSet,
|
||||||
UserIssuesEndpoint,
|
|
||||||
WorkSpaceIssuesEndpoint,
|
WorkSpaceIssuesEndpoint,
|
||||||
IssueActivityEndpoint,
|
IssueActivityEndpoint,
|
||||||
IssueCommentViewSet,
|
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):
|
class UserWorkSpaceIssues(BaseAPIView):
|
||||||
def get(self, request, slug):
|
def get(self, request, slug):
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user