diff options
author | Chocobozzz <me@florianbigard.com> | 2018-10-02 09:02:47 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-02 09:02:47 +0200 |
commit | 913f08f2bd5b03c121ee65751e938e4faa27e7f1 (patch) | |
tree | 968f024c2ebc253c054824526499ea4a87dc3a7b /server | |
parent | c049d791f92cc10f569ee3122edff616cff381f9 (diff) | |
download | PeerTube-913f08f2bd5b03c121ee65751e938e4faa27e7f1.tar.gz PeerTube-913f08f2bd5b03c121ee65751e938e4faa27e7f1.tar.zst PeerTube-913f08f2bd5b03c121ee65751e938e4faa27e7f1.zip |
Fix get version
Diffstat (limited to 'server')
-rw-r--r-- | server/controllers/api/config.ts | 4 |
1 files 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 | |||
10 | import { ClientHtml } from '../../lib/client-html' | 10 | import { ClientHtml } from '../../lib/client-html' |
11 | import { auditLoggerFactory, CustomConfigAuditView, getAuditIdFromRes } from '../../helpers/audit-logger' | 11 | import { auditLoggerFactory, CustomConfigAuditView, getAuditIdFromRes } from '../../helpers/audit-logger' |
12 | import { remove, writeJSON } from 'fs-extra' | 12 | import { remove, writeJSON } from 'fs-extra' |
13 | import { version } from '../../tools/cli' | 13 | import { getVersion } from '../../helpers/utils' |
14 | 14 | ||
15 | const packageJSON = require('../../../../package.json') | 15 | const packageJSON = require('../../../../package.json') |
16 | const configRouter = express.Router() | 16 | const configRouter = express.Router() |
@@ -43,7 +43,7 @@ let serverCommit: string | |||
43 | async function getConfig (req: express.Request, res: express.Response, next: express.NextFunction) { | 43 | async function getConfig (req: express.Request, res: express.Response, next: express.NextFunction) { |
44 | const allowed = await isSignupAllowed() | 44 | const allowed = await isSignupAllowed() |
45 | const allowedForCurrentIP = isSignupAllowedForCurrentIP(req.ip) | 45 | const allowedForCurrentIP = isSignupAllowedForCurrentIP(req.ip) |
46 | serverCommit = (serverCommit) ? serverCommit : version() | 46 | serverCommit = (serverCommit) ? serverCommit : getVersion() |
47 | if (serverCommit === packageJSON.version) serverCommit = '' | 47 | if (serverCommit === packageJSON.version) serverCommit = '' |
48 | 48 | ||
49 | const enabledResolutions = Object.keys(CONFIG.TRANSCODING.RESOLUTIONS) | 49 | const enabledResolutions = Object.keys(CONFIG.TRANSCODING.RESOLUTIONS) |