mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
logging motd/version changes
This commit is contained in:
parent
7c7ed47455
commit
31d033f4de
1 changed files with 4 additions and 1 deletions
|
@ -79,9 +79,11 @@ function LoadMOTD () {
|
|||
|
||||
function Load () {
|
||||
utils.WatchFile(motdFile, (newData) => {
|
||||
logger.Log(`Motd changed: ${newData.replace(/\/n/g, '')}`)
|
||||
LoadMOTD()
|
||||
})
|
||||
utils.WatchFile(versionFile, (newData) => {
|
||||
logger.Log(`Version changed: ${newData.replace(/\/n/g, '')}`)
|
||||
LoadVersion()
|
||||
})
|
||||
|
||||
|
@ -277,7 +279,8 @@ app.post('/isAdding', function (req, res) {
|
|||
let result = actions.ProcessIncomingRequest(
|
||||
req.body.datatoadd,
|
||||
data,
|
||||
{ motd, version })
|
||||
{ motd, version }
|
||||
)
|
||||
|
||||
res.json({
|
||||
success: result !== -1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue