scripts api routes work with either slash or no slash at the end (#3467)

This commit is contained in:
Shuchang Zheng
2025-09-19 09:05:26 -07:00
committed by GitHub
parent 5a0a228b56
commit 71119d4df3

View File

@@ -248,6 +248,10 @@ async def deploy_script(
description="Run a script",
tags=["Scripts"],
)
@base_router.post(
"/scripts/{script_id}/run/",
include_in_schema=False,
)
async def run_script(
request: Request,
background_tasks: BackgroundTasks,
@@ -278,6 +282,11 @@ async def run_script(
include_in_schema=False,
response_model=ScriptBlocksResponse,
)
@base_router.post(
"/scripts/{workflow_permanent_id}/blocks/",
include_in_schema=False,
response_model=ScriptBlocksResponse,
)
async def get_workflow_script_blocks(
workflow_permanent_id: str,
block_script_request: ScriptBlocksRequest,
@@ -432,6 +441,11 @@ async def get_workflow_script_blocks(
include_in_schema=False,
response_model=ScriptCacheKeyValuesResponse,
)
@base_router.get(
"/scripts/{workflow_permanent_id}/{cache_key}/values/",
include_in_schema=False,
response_model=ScriptCacheKeyValuesResponse,
)
async def get_workflow_cache_key_values(
workflow_permanent_id: str,
cache_key: str,
@@ -491,6 +505,10 @@ async def get_workflow_cache_key_values(
"/scripts/{workflow_permanent_id}/value",
include_in_schema=False,
)
@base_router.delete(
"/scripts/{workflow_permanent_id}/value/",
include_in_schema=False,
)
async def delete_workflow_cache_key_value(
workflow_permanent_id: str,
cache_key_value: str = Query(alias="cache-key-value"),