From 3a3bc2ae1b6d7c213b951141a67a711dc9949d20 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 20 Jan 2021 15:42:11 +0100 Subject: [PATCH] This is my contribution to Superalgos --- Client/httpInterface.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index c871fc884..04bd72e57 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -595,12 +595,12 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE const token = unescape(requestParameters[5]) const currentBranch = unescape(requestParameters[6]) const contributionsBranch = unescape(requestParameters[7]) + let error contribute() async function contribute() { - let error - error = await doGit() + await doGit() if (error !== undefined) { let docs = { @@ -614,8 +614,8 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE respondWithDocsObject(docs, result.error) return } - - error = await doGithub() + + await doGithub() if (error !== undefined) { let docs = { @@ -651,7 +651,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE console.log('[ERROR] httpInterface -> App -> Contribute -> doGit -> commitMessage = ' + commitMessage) console.log('[ERROR] httpInterface -> App -> Contribute -> doGit -> currentBranch = ' + currentBranch) console.log('[ERROR] httpInterface -> App -> Contribute -> doGit -> contributionsBranch = ' + contributionsBranch) - return err + error = err } } @@ -690,7 +690,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> token ends with = ' + '...' + token.substring(token.length - 10)) console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> currentBranch = ' + currentBranch) console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> contributionsBranch = ' + contributionsBranch) - return err + error = err } } }