From 76c3648629a08ab51eac46327920a661a304bad9 Mon Sep 17 00:00:00 2001 From: Thomas Heyenbrock Date: Wed, 3 Jun 2020 21:38:24 +0200 Subject: [PATCH] fix: send teamId with api request --- index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index a64660b..a0ab755 100644 --- a/index.js +++ b/index.js @@ -51,7 +51,11 @@ async function main() { deployments.length > 1 ? "s" : "" }, using the latest one.` ); - return api(`/v11/now/deployments/${deployments[0].uid}`); + return api( + `/v11/now/deployments/${deployments[0].uid}${ + teamId ? `?teamId=${teamId}&` : "" + }` + ); } console.log( `No deployments found yet, waiting for ${DEPLOYMENT_SEARCH_INTERVAL} seconds before trying again (${retries} retries remaining)` @@ -80,7 +84,9 @@ async function main() { ); await wait(DEPLOYMENT_READY_INTERVAL); const updatedDeployment = await api( - `/v11/now/deployments/${deployment.id}` + `/v11/now/deployments/${deployment.id}${ + teamId ? `?teamId=${teamId}&` : "" + }` ); return waitForDeploymentToBeReady(updatedDeployment, retries - 1); }