diff --git a/coreplugins/dronedb/api_views.py b/coreplugins/dronedb/api_views.py index 64e76b2b..5ca02300 100644 --- a/coreplugins/dronedb/api_views.py +++ b/coreplugins/dronedb/api_views.py @@ -181,53 +181,7 @@ class VerifyUrlTaskView(TaskView): return Response({'count': res, 'success': True} if res else {'success': False}, status=status.HTTP_200_OK) except Exception as e: - return Response({'error': str(e)}, status=status.HTTP_400_BAD_REQUEST) - - # combined_id = "{}_{}".format(project_pk, pk) - # folder_url = get_current_plugin().get_global_data_store().get_string(combined_id, default = None) - -# class CheckUrlTaskView(TaskView): -# def get(self, request, project_pk=None, pk=None): - -# # Assert that task exists -# self.get_and_check_task(request, pk) - -# # Check if there is an imported url associated with the project and task -# combined_id = "{}_{}".format(project_pk, pk) -# folder_url = get_current_plugin().get_global_data_store().get_string(combined_id, default = None) - -# if folder_url == None: -# return Response({}, status=status.HTTP_200_OK) -# else: -# return Response({'folder_url': folder_url}, status=status.HTTP_200_OK) - -# class PlatformsVerifyTaskView(TaskView): -# def get(self, request, platform_name): -# # Read the form data -# folder_url = request.GET.get('folderUrl', None) - -# # Fetch the platform by name -# platform = get_platform_by_name(platform_name) - -# # Make sure that the platform actually exists -# if platform == None: -# return Response({'error': 'Failed to find a platform with the name \'{}\''.format(platform_name)}, status=status.HTTP_400_BAD_REQUEST) - -# # Verify that the folder url is valid -# folder = platform.verify_folder_url(folder_url) -# if folder == None: -# return Response({'error': 'Invalid URL'}, status=status.HTTP_400_BAD_REQUEST) - -# # Return the folder -# return Response({'folder': folder.serialize()}, status=status.HTTP_200_OK) - - -# # class PlatformsTaskView(TaskView): -# # def get(self, request): -# # # Fetch and return all platforms -# # platforms = get_all_platforms() -# # return Response({'platforms': [platform.serialize(user = request.user) for platform in platforms]}, status=status.HTTP_200_OK) - + return Response({'error': str(e)}, status=status.HTTP_400_BAD_REQUEST) def import_files(task_id, carrier): import requests