fix linter issues

Signed-off-by: Ruben ten Hove <git@rhtenhove.nl>
This commit is contained in:
Ruben ten Hove 2019-10-30 07:58:36 +01:00
parent afc4a3e11d
commit 2a365d6971

View File

@ -6,11 +6,11 @@ const GitlabStrategy = require('passport-gitlab2').Strategy
const config = require('../../../config')
const response = require('../../../response')
const { setReturnToFromReferer, passportGeneralCallback } = require('../utils')
const HttpsProxyAgent = require('https-proxy-agent');
const HttpsProxyAgent = require('https-proxy-agent')
const gitlabAuth = module.exports = Router()
let gitlabAuthStrategy = new GitlabStrategy({
const gitlabAuthStrategy = new GitlabStrategy({
baseURL: config.gitlab.baseURL,
clientID: config.gitlab.clientID,
clientSecret: config.gitlab.clientSecret,
@ -19,8 +19,8 @@ let gitlabAuthStrategy = new GitlabStrategy({
}, passportGeneralCallback)
if (process.env['https_proxy']) {
let httpsProxyAgent = new HttpsProxyAgent(process.env['https_proxy']);
gitlabAuthStrategy._oauth2.setAgent(httpsProxyAgent);
const httpsProxyAgent = new HttpsProxyAgent(process.env['https_proxy'])
gitlabAuthStrategy._oauth2.setAgent(httpsProxyAgent)
}
passport.use(gitlabAuthStrategy)