mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 10:15:17 -04:00
Add possibility to choose between version v3 or v4 for the gitlab api.
Apart from the uri versioning, one big change is the snippet visibility post data (visibility_level -> visibility) Default gitlab api version to v4 Signed-off-by: Cédric Couralet <cedric.couralet@gmail.com>
This commit is contained in:
parent
93a3ce1164
commit
66d374b128
6 changed files with 24 additions and 9 deletions
|
@ -103,6 +103,12 @@ config.isSAMLEnable = config.saml.idpSsoUrl
|
|||
config.isOAuth2Enable = config.oauth2.clientID && config.oauth2.clientSecret
|
||||
config.isPDFExportEnable = config.allowPDFExport
|
||||
|
||||
// Check gitlab api version
|
||||
if (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 v3')
|
||||
config.gitlab.version = 'v4'
|
||||
}
|
||||
|
||||
// Only update i18n files in development setups
|
||||
config.updateI18nFiles = (env === Environment.development)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue