diff --git a/index.js b/index.js index b108bd1..e526b20 100644 --- a/index.js +++ b/index.js @@ -95,8 +95,6 @@ async function postCode() { core.info(`Key: ${key}`); }); - core.info(files_to_push); - const login_arguments = { token: token, protocol: protocol, @@ -107,9 +105,6 @@ async function postCode() { core.info("login_arguments:"); core.info(JSON.stringify(login_arguments, null, 2)); - Object.keys(login_arguments).forEach((key) => { - core.info(`Key: ${key}`); - }); const errorMessage = validateAuthentication(token, username, password); if (errorMessage) { @@ -120,9 +115,10 @@ async function postCode() { if (token) { api = new ScreepsAPI(login_arguments); } else { - core.info(`Logging into as usewr ${username}`); + core.info(`Logging into as user ${username}`); api = new ScreepsAPI(login_arguments); - api.auth(username, password); + await api.auth(username, password); + core.info("Authorized!"); } const response = await api.code.set(branch, files_to_push); core.info(JSON.stringify(response, null, 2));