Skip to content

Commit 7d912ee

Browse files
committed
Add new endpoint to router manifest
1 parent b860589 commit 7d912ee

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/murfey/server/api/session_control.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,6 @@ def delete_rsyncer(session_id: int, source: Path, db=murfey_db):
320320
)
321321

322322

323-
@spa_router.get("/sessions/{session_id}/make_atlas_jpg")
324-
def make_atlas_jpg(session_id: MurfeySessionID, atlas_mrc: str, db=murfey_db):
325-
session = db.exec(select(Session).where(Session.id == session_id)).one()
326-
return atlas_jpg_from_mrc(session.instrument_name, session.visit, Path(atlas_mrc))
327-
328-
329323
@spa_router.get("/sessions/{session_id}/grid_squares")
330324
def get_grid_squares(session_id: MurfeySessionID, db=murfey_db):
331325
return _get_grid_squares(session_id, db)
@@ -354,6 +348,12 @@ def get_foil_hole(
354348
return _get_foil_hole(session_id, fh_name, db)
355349

356350

351+
@spa_router.post("/sessions/{session_id}/make_atlas_jpg")
352+
def make_atlas_jpg(session_id: MurfeySessionID, atlas_mrc: str, db=murfey_db):
353+
session = db.exec(select(Session).where(Session.id == session_id)).one()
354+
return atlas_jpg_from_mrc(session.instrument_name, session.visit, Path(atlas_mrc))
355+
356+
357357
@spa_router.post("/sessions/{session_id}/grid_square/{gsid}")
358358
def register_grid_square(
359359
session_id: MurfeySessionID,

src/murfey/util/route_manifest.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,11 @@ murfey.server.api.session_control.spa_router:
814814
type: int
815815
methods:
816816
- GET
817+
- path: /sessions/{session_id}/make_atlas_jpg
818+
function: make_atlas_jpg
819+
path_params: []
820+
methods:
821+
- POST
817822
- path: /session_control/spa/sessions/{session_id}/grid_square/{gsid}
818823
function: register_grid_square
819824
path_params:

0 commit comments

Comments
 (0)