[REF] Refactor
This commit is contained in:
10
app/api/cruds/path/read.py
Normal file
10
app/api/cruds/path/read.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import os
|
||||
from sqlalchemy.orm import Session
|
||||
from sqlalchemy import select
|
||||
|
||||
from ....schema.library.path import Path
|
||||
|
||||
def read(session:Session, _id:int):
|
||||
stmt = select(Path).where(Path.id == _id)
|
||||
path:Path = session.scalars(stmt).one()
|
||||
return path
|
||||
Reference in New Issue
Block a user