From 0661df0a25ff642b00ce8e3b5f93797c556af410 Mon Sep 17 00:00:00 2001 From: Philip Zingmark Date: Thu, 23 Jan 2025 16:45:55 +0100 Subject: [PATCH] fix bug when fetching a deployment by id --- src/api/deploy/deployments.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/api/deploy/deployments.ts b/src/api/deploy/deployments.ts index 28923cd..610aa92 100644 --- a/src/api/deploy/deployments.ts +++ b/src/api/deploy/deployments.ts @@ -9,7 +9,11 @@ export const getDeployment = async (token: string, id: string) => { }, }); const response = [await res.json()]; - const result = response.map((obj) => ({ ...obj, type: "deployment" })); + const result = response.map((obj) => ({ + ...obj, + deploymentType: obj.type, + type: "deployment", + })); if (Array.isArray(result)) return result; else throw new Error("Error getting deployments, response was not an array"); };