Fix get version

pull/1162/merge
Chocobozzz 2018-10-02 09:02:47 +02:00
parent c049d791f9
commit 913f08f2bd
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ import { customConfigUpdateValidator } from '../../middlewares/validators/config
import { ClientHtml } from '../../lib/client-html'
import { auditLoggerFactory, CustomConfigAuditView, getAuditIdFromRes } from '../../helpers/audit-logger'
import { remove, writeJSON } from 'fs-extra'
import { version } from '../../tools/cli'
import { getVersion } from '../../helpers/utils'
const packageJSON = require('../../../../package.json')
const configRouter = express.Router()
@ -43,7 +43,7 @@ let serverCommit: string
async function getConfig (req: express.Request, res: express.Response, next: express.NextFunction) {
const allowed = await isSignupAllowed()
const allowedForCurrentIP = isSignupAllowedForCurrentIP(req.ip)
serverCommit = (serverCommit) ? serverCommit : version()
serverCommit = (serverCommit) ? serverCommit : getVersion()
if (serverCommit === packageJSON.version) serverCommit = ''
const enabledResolutions = Object.keys(CONFIG.TRANSCODING.RESOLUTIONS)