mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
fix plugin actions api
This commit is contained in:
@@ -57,7 +57,8 @@ class InvokePluginAction(BaseAction):
|
|||||||
if not plugin_actions:
|
if not plugin_actions:
|
||||||
logger.error(f"插件不存在: {params.plugin_id}")
|
logger.error(f"插件不存在: {params.plugin_id}")
|
||||||
return context
|
return context
|
||||||
action = next((action for action in plugin_actions if action.action_id == params.action_id), None)
|
actions = plugin_actions[0].get("actions", [])
|
||||||
|
action = next((action for action in actions if action.action_id == params.action_id), None)
|
||||||
if not action or not action.get("func"):
|
if not action or not action.get("func"):
|
||||||
logger.error(f"插件动作不存在: {params.plugin_id} - {params.action_id}")
|
logger.error(f"插件动作不存在: {params.plugin_id} - {params.action_id}")
|
||||||
return context
|
return context
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ def create_workflow(workflow: schemas.Workflow,
|
|||||||
return schemas.Response(success=True, message="创建工作流成功")
|
return schemas.Response(success=True, message="创建工作流成功")
|
||||||
|
|
||||||
|
|
||||||
@router.get("/actions/{plugin_id}", summary="查询插件动作", response_model=List[dict])
|
@router.get("/plugin/actions", summary="查询插件动作", response_model=List[dict])
|
||||||
def list_plugin_actions(plugin_id: str, _: schemas.TokenPayload = Depends(get_current_active_user)) -> Any:
|
def list_plugin_actions(plugin_id: str = None, _: schemas.TokenPayload = Depends(get_current_active_user)) -> Any:
|
||||||
"""
|
"""
|
||||||
获取所有动作
|
获取所有动作
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user