mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Optimize config endpoint
This commit is contained in:
parent
f95cb03a29
commit
1b5e2d7290
3 changed files with 9 additions and 12 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue