Use simpleGit to get app version

This commit is contained in:
Cohee
2023-09-17 14:27:41 +03:00
parent dc1121b72a
commit 11e7ca76e1
6 changed files with 25 additions and 34 deletions

View File

@ -309,8 +309,8 @@ app.get('/deviceinfo', function (request, response) {
const deviceInfo = deviceDetector.parse(userAgent || "");
return response.send(deviceInfo);
});
app.get('/version', function (_, response) {
const data = getVersion();
app.get('/version', async function (_, response) {
const data = await getVersion();
response.send(data);
})
@ -3255,7 +3255,7 @@ const autorunUrl = new URL(
);
const setupTasks = async function () {
const version = getVersion();
const version = await getVersion();
console.log(`SillyTavern ${version.pkgVersion}` + (version.gitBranch ? ` '${version.gitBranch}' (${version.gitRevision})` : ''));