Skip to content

Commit

Permalink
Disable global workspace endpoint and added lookup dir as compulsary …
Browse files Browse the repository at this point in the history
…to reduce lookup
  • Loading branch information
kshitijrajsharma committed Oct 19, 2024
1 parent 07d6e2f commit 2e683d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/core/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
path(
"feedback-aoi/gpx/<int:feedback_aoi_id>/", GenerateFeedbackAOIGpxView.as_view()
),
path("workspace/", TrainingWorkspaceView.as_view()),
# path("workspace/", TrainingWorkspaceView.as_view()),
path(
"workspace/download/<path:lookup_dir>/", TrainingWorkspaceDownloadView.as_view()
),
Expand Down
2 changes: 1 addition & 1 deletion backend/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ def get(self, request, feedback_aoi_id: int):
class TrainingWorkspaceView(APIView):
@method_decorator(cache_page(60 * 15))
# @method_decorator(vary_on_headers("access-token"))
def get(self, request, lookup_dir=None):
def get(self, request, lookup_dir):
"""List out status of training workspace : size in bytes"""
# {workspace_dir:{file_name:{size:20,type:file},dir_name:{size:20,len:4,type:dir}}}
base_dir = settings.TRAINING_WORKSPACE
Expand Down

0 comments on commit 2e683d9

Please sign in to comment.