diff --git a/app/routers/recipes.py b/app/routers/recipes.py index e0135c9..1befb91 100644 --- a/app/routers/recipes.py +++ b/app/routers/recipes.py @@ -28,6 +28,10 @@ class RecipeUploadRequest(BaseModel): description: Optional[str] = None +class RecipeRunRequest(BaseModel): + inputs: List[str] = [] + + def get_recipe_service(): """Get recipe service instance.""" return RecipeService(get_redis_client(), get_cache_manager()) @@ -155,7 +159,7 @@ async def delete_recipe( @router.post("/{recipe_id}/run") async def run_recipe( recipe_id: str, - inputs: List[str], + req: RecipeRunRequest, ctx: UserContext = Depends(require_auth), recipe_service: RecipeService = Depends(get_recipe_service), ): @@ -172,7 +176,7 @@ async def run_recipe( run_service = RunService(database, get_redis_client(), get_cache_manager()) run, error = await run_service.create_run( recipe=recipe.get("name", recipe_id), - inputs=inputs, + inputs=req.inputs, use_dag=True, actor_id=ctx.actor_id, l2_server=ctx.l2_server,