Skip to content

Commit a971619

Browse files
Removed unused route datapath
1 parent cacbc6c commit a971619

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

mxcubeweb/routes/beamline.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
Response,
66
jsonify,
77
)
8-
from mxcubecore import HardwareRepository as HWR
98

109

1110
def init_route(app, server, url_prefix):
@@ -16,16 +15,6 @@ def init_route(app, server, url_prefix):
1615
def beamline_get_all_attributes():
1716
return jsonify(app.beamline.beamline_get_all_attributes())
1817

19-
@bp.route("/datapath", methods=["GET"])
20-
@server.restrict
21-
def beamline_get_data_path():
22-
"""
23-
Retrieve data directory from the session hwobj,
24-
this is specific for each beamline.
25-
"""
26-
data = HWR.beamline.session.get_base_image_directory()
27-
return jsonify({"path": data})
28-
2918
@bp.route("/prepare_beamline", methods=["PUT"])
3019
@server.require_control
3120
@server.restrict

test/test_beamline_routes.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,3 @@ def test_get_beam_info(client):
139139
assert isinstance(data["position"][1], float)
140140
assert isinstance(data["size_x"], float)
141141
assert isinstance(data["size_y"], float)
142-
143-
144-
def test_get_data_path(client):
145-
"""
146-
Retrieve data path, this is specific for each beamline.
147-
"""
148-
149-
resp = client.get("/mxcube/api/v0.1/beamline/datapath")
150-
data = json.loads(resp.data)
151-
assert isinstance(data["path"], str)
152-
assert len(data) > 0

0 commit comments

Comments
 (0)