File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -1805,6 +1805,18 @@ async def get_sessions(db=murfey_db):
18051805 return res
18061806
18071807
1808+ @router .get ("/instruments/{instrument_name}/visits/{visit_name}/sessions" )
1809+ def get_sessions_with_visit (
1810+ instrument_name : str , visit_name : str , db = murfey_db
1811+ ) -> List [Session ]:
1812+ sessions = db .exec (
1813+ select (Session )
1814+ .where (Session .instrument_name == instrument_name )
1815+ .where (Session .visit == visit_name )
1816+ ).all ()
1817+ return sessions
1818+
1819+
18081820@router .get ("/instruments/{instrument_name}/sessions" )
18091821async def get_sessions_by_instrument_name (
18101822 instrument_name : str , db = murfey_db
Original file line number Diff line number Diff line change @@ -1547,6 +1547,18 @@ async def get_sessions(db=murfey_db):
15471547 return res
15481548
15491549
1550+ @router .get ("/instruments/{instrument_name}/visits/{visit_name}/sessions" )
1551+ def get_sessions_with_visit (
1552+ instrument_name : str , visit_name : str , db = murfey_db
1553+ ) -> List [Session ]:
1554+ sessions = db .exec (
1555+ select (Session )
1556+ .where (Session .instrument_name == instrument_name )
1557+ .where (Session .visit == visit_name )
1558+ ).all ()
1559+ return sessions
1560+
1561+
15501562@router .get ("/instruments/{instrument_name}/sessions" )
15511563async def get_sessions_by_instrument_name (
15521564 instrument_name : str , db = murfey_db
You can’t perform that action at this time.
0 commit comments