Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Make static only REST endpoint listing the only supported behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
zachmullen committed Jun 24, 2024
1 parent 4494a14 commit 945d967
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
9 changes: 3 additions & 6 deletions slicer_cli_web/docker_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,9 @@ def __init__(self, name):

self.route('GET', ('path_match', ), self.getMatchingResource)

if os.environ.get('GIRDER_STATIC_REST_ONLY'):
self.route('POST', ('cli', ':id', 'run'), self.runCli)
self.route('POST', ('cli', ':id', 'rerun'), self.rerunCli)
self.route('POST', ('cli', ':id', 'datalist', ':key'), self.datalistHandler)
else:
self._generateAllItemEndPoints()
self.route('POST', ('cli', ':id', 'run'), self.runCli)
self.route('POST', ('cli', ':id', 'rerun'), self.rerunCli)
self.route('POST', ('cli', ':id', 'datalist', ':key'), self.datalistHandler)

@access.user
@autoDescribeRoute(
Expand Down
4 changes: 0 additions & 4 deletions slicer_cli_web/girder_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import datetime
import json
import logging
import os
from pathlib import Path

from girder import events
Expand Down Expand Up @@ -79,9 +78,6 @@ def load(self, info):

Job().exposeFields(level=AccessType.READ, fields={'slicerCLIBindings'})

if not os.environ.get('GIRDER_STATIC_REST_ONLY'):
events.bind('jobs.job.update.after', resource.resourceName,
resource.addRestEndpoints)
events.bind('data.process', 'slicer_cli_web', _onUpload)

count = 0
Expand Down

0 comments on commit 945d967

Please sign in to comment.