added automatic client page reload (#3188)

solution for #3105 

~~not sure if updatenotification is the right place, so opinions?~~

now impleneted in `main.js`
This commit is contained in:
Karsten Hassel 2023-09-13 22:46:17 +02:00 committed by GitHub
parent f2957f90df
commit 7a1591b2d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 41 additions and 2 deletions

View file

@ -1,6 +1,7 @@
const fs = require("fs");
const path = require("path");
const Log = require("logger");
const startUp = new Date();
/**
* Gets the config.
@ -11,6 +12,15 @@ function getConfig(req, res) {
res.send(config);
}
/**
* Gets the startup time.
* @param {Request} req - the request
* @param {Response} res - the result
*/
function getStartup(req, res) {
res.send(startUp);
}
/**
* A method that forwards HTTP Get-methods to the internet to avoid CORS-errors.
*
@ -117,4 +127,4 @@ function getVersion(req, res) {
res.send(global.version);
}
module.exports = { cors, getConfig, getHtml, getVersion };
module.exports = { cors, getConfig, getHtml, getVersion, getStartup };