Fix config endpoint

This commit is contained in:
Chocobozzz
2018-10-03 14:35:35 +02:00
parent 6a6951ec10
commit 499d901595
5 changed files with 28 additions and 14 deletions

View File

@@ -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 : getVersion()
serverCommit = (serverCommit) ? serverCommit : await getVersion()
if (serverCommit === packageJSON.version) serverCommit = ''
const enabledResolutions = Object.keys(CONFIG.TRANSCODING.RESOLUTIONS)