From 913f08f2bd5b03c121ee65751e938e4faa27e7f1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 2 Oct 2018 09:02:47 +0200 Subject: Fix get version --- server/controllers/api/config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts index 633cf5e34..f14104d7f 100644 --- a/server/controllers/api/config.ts +++ b/server/controllers/api/config.ts @@ -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) -- cgit v1.2.3