DB連動実装

This commit is contained in:
2023-09-27 14:35:24 +09:00
parent 418f45f997
commit 4c6b2ea844
16 changed files with 688 additions and 24 deletions

View File

@@ -173,4 +173,10 @@ def get_flow(db: Session, flowid: str):
flow = db.query(models.Flow).filter(models.Flow.flowid == flowid).first()
if not flow:
raise HTTPException(status_code=404, detail="Data not found")
return flow
return flow
def get_flows_by_app(db: Session, appid: str):
flows = db.query(models.Flow).filter(models.Flow.appid == appid).all()
if not flows:
raise HTTPException(status_code=404, detail="Data not found")
return flows