This commit is contained in:
2023-11-13 22:04:27 +09:00
4 changed files with 12 additions and 5 deletions

View File

@@ -103,9 +103,11 @@ async def flow_details(
async def flow_list(
request: Request,
appid: str,
user=Depends(get_current_user),
db=Depends(get_db),
):
flows = get_flows_by_app(db, appid)
domain = get_activedomain(db, user.id)
flows = get_flows_by_app(db, domain.id, appid)
return flows
@@ -113,9 +115,11 @@ async def flow_list(
async def flow_create(
request: Request,
flow: FlowBase,
user=Depends(get_current_user),
db=Depends(get_db),
):
return create_flow(db, flow)
domain = get_activedomain(db, user.id)
return create_flow(db, domain.id, flow)
@r.put(