chore: removed extra exporter function (#1953)

This commit is contained in:
Bavisetti Narayan 2023-08-23 22:13:04 +05:30 committed by GitHub
parent 2d1406953e
commit 529ab19747
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 26 deletions

View File

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

View File

@ -1827,28 +1827,3 @@ class IssueVotePublicViewSet(BaseViewSet):
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,
)