mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Version check
This commit is contained in:
@ -85,7 +85,7 @@ export {
|
|||||||
// API OBJECT FOR EXTERNAL WIRING
|
// API OBJECT FOR EXTERNAL WIRING
|
||||||
window["TavernAI"] = {};
|
window["TavernAI"] = {};
|
||||||
|
|
||||||
const VERSION = "1.2.8";
|
const VERSION = "1.1.0";
|
||||||
let converter = new showdown.Converter({ emoji: "true" });
|
let converter = new showdown.Converter({ emoji: "true" });
|
||||||
let bg_menu_toggle = false;
|
let bg_menu_toggle = false;
|
||||||
const systemUserName = "TavernAI";
|
const systemUserName = "TavernAI";
|
||||||
|
@ -198,7 +198,7 @@ app.get("/notes/*", function (request, response) {
|
|||||||
app.post("/getlastversion", jsonParser, function (request, response_getlastversion = response) {
|
app.post("/getlastversion", jsonParser, function (request, response_getlastversion = response) {
|
||||||
if (!request.body) return response_getlastversion.sendStatus(400);
|
if (!request.body) return response_getlastversion.sendStatus(400);
|
||||||
|
|
||||||
const repo = 'TavernAI/TavernAI';
|
const repo = 'SillyLossy/TavernAI';
|
||||||
let req;
|
let req;
|
||||||
req = https.request({
|
req = https.request({
|
||||||
hostname: 'github.com',
|
hostname: 'github.com',
|
||||||
@ -207,7 +207,7 @@ app.post("/getlastversion", jsonParser, function (request, response_getlastversi
|
|||||||
}, (res) => {
|
}, (res) => {
|
||||||
if (res.statusCode === 302) {
|
if (res.statusCode === 302) {
|
||||||
const glocation = res.headers.location;
|
const glocation = res.headers.location;
|
||||||
const versionStartIndex = glocation.lastIndexOf('@') + 1;
|
const versionStartIndex = glocation.lastIndexOf('/tag/') + 5;
|
||||||
const version = glocation.substring(versionStartIndex);
|
const version = glocation.substring(versionStartIndex);
|
||||||
//console.log(version);
|
//console.log(version);
|
||||||
response_getlastversion.send({ version: version });
|
response_getlastversion.send({ version: version });
|
||||||
|
Reference in New Issue
Block a user