mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 09:42:21 -04:00
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:
parent
f2957f90df
commit
7a1591b2d6
5 changed files with 41 additions and 2 deletions
|
@ -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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue