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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user