Omit unneeded warning if no gitlab is configured

This patch should fix the unneeded warning of the wrong API version,
when gitlab isn't configured at all.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
This commit is contained in:
Sheogorath 2018-09-25 00:26:30 +02:00
parent 9e4d165663
commit 7e0be69abb
No known key found for this signature in database
GPG key ID: 1F05CC3635CDDFFD

View file

@ -104,7 +104,7 @@ config.isOAuth2Enable = config.oauth2.clientID && config.oauth2.clientSecret
config.isPDFExportEnable = config.allowPDFExport config.isPDFExportEnable = config.allowPDFExport
// Check gitlab api version // Check gitlab api version
if (config.gitlab.version !== 'v4' && config.gitlab.version !== 'v3') { if (config.gitlab && config.gitlab.version !== 'v4' && config.gitlab.version !== 'v3') {
logger.warn('config.js contains wrong version (' + config.gitlab.version + ') for gitlab api; it should be \'v3\' or \'v4\'. Defaulting to v4') logger.warn('config.js contains wrong version (' + config.gitlab.version + ') for gitlab api; it should be \'v3\' or \'v4\'. Defaulting to v4')
config.gitlab.version = 'v4' config.gitlab.version = 'v4'
} }