From 1b5e2d72900c8ceaf76940b72839d3c424ac96e8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 23 Nov 2018 11:06:10 +0100 Subject: Optimize config endpoint --- server/helpers/utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/helpers/utils.ts') diff --git a/server/helpers/utils.ts b/server/helpers/utils.ts index 049c3f8bc..5c9d6fe2f 100644 --- a/server/helpers/utils.ts +++ b/server/helpers/utils.ts @@ -57,7 +57,7 @@ function getSecureTorrentName (originalName: string) { return sha256(originalName) + '.torrent' } -async function getVersion () { +async function getServerCommit () { try { const tag = await execPromise2( '[ ! -d .git ] || git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || true', @@ -77,7 +77,7 @@ async function getVersion () { logger.debug('Cannot get version from git HEAD.', { err }) } - return require('../../../package.json').version + return '' } /** @@ -102,7 +102,7 @@ export { getFormattedObjects, getSecureTorrentName, getServerActor, - getVersion, + getServerCommit, generateVideoTmpPath, getUUIDFromFilename } -- cgit v1.2.3