chore: removed extra exporter function

This commit is contained in:
NarayanBavisetti 2023-08-23 19:39:59 +05:30
parent eee6658cc2
commit 97820e3528
2 changed files with 4 additions and 26 deletions

View File

@ -89,7 +89,6 @@ from plane.api.views import (
IssueCommentPublicViewSet, IssueCommentPublicViewSet,
IssueReactionViewSet, IssueReactionViewSet,
CommentReactionViewSet, CommentReactionViewSet,
ExportIssuesEndpoint,
## End Issues ## End Issues
# States # States
StateViewSet, StateViewSet,
@ -175,6 +174,10 @@ from plane.api.views import (
InboxIssuePublicViewSet, InboxIssuePublicViewSet,
IssueVotePublicViewSet, IssueVotePublicViewSet,
## End Public Boards ## End Public Boards
## Exporter
ExportIssuesEndpoint,
## End Exporter
) )

View File

@ -1827,28 +1827,3 @@ class IssueVotePublicViewSet(BaseViewSet):
status=status.HTTP_400_BAD_REQUEST, status=status.HTTP_400_BAD_REQUEST,
) )
class ExportIssuesEndpoint(BaseAPIView):
permission_classes = [
WorkSpaceAdminPermission,
]
def post(self, request, slug):
try:
issue_export_task.delay(
email=request.user.email, data=request.data, slug=slug ,exporter_name=request.user.first_name
)
return Response(
{
"message": f"Once the export is ready it will be emailed to you at {str(request.user.email)}"
},
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,
)