From 1eb6a2005d3e30177b1f9367e7c832e32b8b4f33 Mon Sep 17 00:00:00 2001 From: findolor Date: Sat, 15 Feb 2025 13:10:26 +0300 Subject: [PATCH] update --- .../[strategyName]/[deploymentKey]/+layout.ts | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/packages/webapp/src/routes/deploy/[strategyName]/[deploymentKey]/+layout.ts b/packages/webapp/src/routes/deploy/[strategyName]/[deploymentKey]/+layout.ts index 0c02e66f8..f2003ee82 100644 --- a/packages/webapp/src/routes/deploy/[strategyName]/[deploymentKey]/+layout.ts +++ b/packages/webapp/src/routes/deploy/[strategyName]/[deploymentKey]/+layout.ts @@ -9,20 +9,10 @@ export const load: LayoutLoad = async ({ params, parent }) => { const { deploymentKey } = params; const { dotrain } = (await parent()) as unknown as LayoutParentData; - // Process deployments for both raw and registry strategies - const deploymentWithDetails = await DotrainOrderGui.getDeploymentDetails(dotrain); - const deployments = Array.from(deploymentWithDetails, ([key, details]) => ({ - key, - ...details - })); - - const deployment = deployments.find( - (deployment: { key: string }) => deployment.key === deploymentKey + const { name, description } = await DotrainOrderGui.getDeploymentDetail( + dotrain, + deploymentKey || '' ); - if (!deployment) { - throw new Error(`Deployment ${deploymentKey} not found`); - } - - return { deployment, dotrain }; + return { deployment: { key: deploymentKey, name, description }, dotrain }; };