Jon/improve cache key value deletion (#3464)

This commit is contained in:
Jonathan Dobson
2025-09-18 11:02:21 -04:00
committed by GitHub
parent f22c5ad1b0
commit 44d7d11380
2 changed files with 3 additions and 3 deletions

View File

@@ -379,7 +379,7 @@ function Workspace({
const client = await getClient(credentialGetter, "sans-api-v1"); const client = await getClient(credentialGetter, "sans-api-v1");
const encodedCacheKeyValue = encodeURIComponent(cacheKeyValue); const encodedCacheKeyValue = encodeURIComponent(cacheKeyValue);
return client.delete( return client.delete(
`/scripts/${workflowPermanentId}/value/${encodedCacheKeyValue}`, `/scripts/${workflowPermanentId}/value/?cache-key-value=${encodedCacheKeyValue}`,
); );
}, },
onSuccess: () => { onSuccess: () => {

View File

@@ -485,12 +485,12 @@ async def get_workflow_cache_key_values(
@base_router.delete( @base_router.delete(
"/scripts/{workflow_permanent_id}/value/{cache_key_value}", "/scripts/{workflow_permanent_id}/value",
include_in_schema=False, include_in_schema=False,
) )
async def delete_workflow_cache_key_value( async def delete_workflow_cache_key_value(
workflow_permanent_id: str, workflow_permanent_id: str,
cache_key_value: str, cache_key_value: str = Query(alias="cache-key-value"),
current_org: Organization = Depends(org_auth_service.get_current_org), current_org: Organization = Depends(org_auth_service.get_current_org),
) -> dict[str, str]: ) -> dict[str, str]:
"""Delete a specific cache key value for a workflow.""" """Delete a specific cache key value for a workflow."""