From dbd765cbdf1fe39d3ab523664ae7c16595ccd3bb Mon Sep 17 00:00:00 2001 From: Philipp Horstenkamp Date: Sun, 26 Nov 2023 20:59:44 +0100 Subject: [PATCH] Reworked index. --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index ff9a564..3d403f9 100644 --- a/index.js +++ b/index.js @@ -113,9 +113,8 @@ async function postCode() { core.error(errorMessage); return; } - let api; + let api = new ScreepsAPI(login_arguments); if (token) { - api = new ScreepsAPI(login_arguments); const response = await api.code.set(branch, files_to_push); core.info(JSON.stringify(response, null, 2)); } else {