mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-22 06:29:17 -04:00
Update version handling
This commit is contained in:
parent
6bece8796e
commit
be26bb75d9
2 changed files with 14 additions and 4 deletions
|
@ -141,12 +141,21 @@ async function sendAPIKeyList(socket) {
|
|||
/**
|
||||
* Emits the version information to the client.
|
||||
* @param {Socket} socket Socket.io socket instance
|
||||
* @param {boolean} hideVersion
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async function sendInfo(socket) {
|
||||
async function sendInfo(socket, hideVersion = false) {
|
||||
let version;
|
||||
let latestVersion;
|
||||
|
||||
if (!hideVersion) {
|
||||
version = checkVersion.version;
|
||||
latestVersion = checkVersion.latestVersion;
|
||||
}
|
||||
|
||||
socket.emit("info", {
|
||||
version: checkVersion.version,
|
||||
latestVersion: checkVersion.latestVersion,
|
||||
version,
|
||||
latestVersion,
|
||||
primaryBaseURL: await setting("primaryBaseURL"),
|
||||
serverTimezone: await server.getTimezone(),
|
||||
serverTimezoneOffset: server.getTimezoneOffset(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue