bugfix get flow -> get flow by appid
This commit is contained in:
@@ -236,22 +236,24 @@ async def action_data(
|
||||
raise APIException('platform:actions',request.url._url,f"Error occurred while get actions:",e)
|
||||
|
||||
@r.get(
|
||||
"/flow/{flowid}",
|
||||
response_model=Flow,
|
||||
"/flow/{appid}",tags=["App"],
|
||||
response_model=ApiReturnModel[List[Flow|None]],
|
||||
response_model_exclude_none=True,
|
||||
)
|
||||
async def flow_details(
|
||||
request: Request,
|
||||
flowid: str,
|
||||
appid: str,
|
||||
user=Depends(get_current_active_user),
|
||||
db=Depends(get_db),
|
||||
):
|
||||
try:
|
||||
app = get_flow(db, flowid)
|
||||
return app
|
||||
domain = domainService.get_default_domain(db, user.id)
|
||||
if not domain:
|
||||
return ApiReturnModel(data = None)
|
||||
return ApiReturnModel(data = appService.get_flow(db, domain.url, appid,user.id))
|
||||
except Exception as e:
|
||||
raise APIException('platform:flow',request.url._url,f"Error occurred while get flow by flowid:",e)
|
||||
|
||||
|
||||
@r.get(
|
||||
"/flows/{appid}",
|
||||
response_model=List[Flow|None],
|
||||
|
||||
Reference in New Issue
Block a user