From 4da68597f701376307fe8849ed57edd3a80833ed Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Fri, 31 May 2019 00:27:56 +0200 Subject: Fix eslint warnings Since we are about to release it's time to finally fix our linting. This patch basically runs eslint --fix and does some further manual fixes. Also it sets up eslint to fail on every warning on order to make warnings visable in the CI process. There should no functional change be introduced. Signed-off-by: Sheogorath --- lib/response.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'lib/response.js') diff --git a/lib/response.js b/lib/response.js index 9fc9258c..dd33e42b 100644 --- a/lib/response.js +++ b/lib/response.js @@ -18,7 +18,7 @@ var utils = require('./utils') // public var response = { errorForbidden: function (res) { - const {req} = res + const { req } = res if (req.user) { responseError(res, '403', 'Forbidden', 'oh no.') } else { @@ -549,16 +549,16 @@ function gitlabActionProjects (req, res, note) { ret.accesstoken = user.accessToken ret.profileid = user.profileid request( - config.gitlab.baseURL + '/api/' + config.gitlab.version + '/projects?membership=yes&per_page=100&access_token=' + user.accessToken, - function (error, httpResponse, body) { - if (!error && httpResponse.statusCode === 200) { - ret.projects = JSON.parse(body) - return res.send(ret) - } else { - return res.send(ret) - } - } - ) + config.gitlab.baseURL + '/api/' + config.gitlab.version + '/projects?membership=yes&per_page=100&access_token=' + user.accessToken, + function (error, httpResponse, body) { + if (!error && httpResponse.statusCode === 200) { + ret.projects = JSON.parse(body) + return res.send(ret) + } else { + return res.send(ret) + } + } + ) }).catch(function (err) { logger.error('gitlab action projects failed: ' + err) return response.errorInternalError(res) -- cgit v1.2.3