mirror of
https://github.com/open-webui/pipelines
synced 2025-05-12 16:40:45 +00:00
refac
This commit is contained in:
parent
ee2e85ca24
commit
84130f990a
7
main.py
7
main.py
@ -498,7 +498,12 @@ async def get_status():
|
|||||||
@app.get("/pipelines")
|
@app.get("/pipelines")
|
||||||
async def list_pipelines(user: str = Depends(get_current_user)):
|
async def list_pipelines(user: str = Depends(get_current_user)):
|
||||||
if user == API_KEY:
|
if user == API_KEY:
|
||||||
return {"data": list(PIPELINE_MODULES.keys())}
|
return {
|
||||||
|
"data": [
|
||||||
|
{"id": pipeline_id, "name": PIPELINE_NAMES[pipeline_id]}
|
||||||
|
for pipeline_id in list(PIPELINE_MODULES.keys())
|
||||||
|
]
|
||||||
|
}
|
||||||
else:
|
else:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||||
|
Loading…
Reference in New Issue
Block a user