mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2026-04-28 11:17:38 +02:00
Saving data fix round 2
This commit is contained in:
+1
-12
@@ -118,7 +118,7 @@ function ProcessIncomingRequest(recievedData, qdb, infos, dryRun, user) {
|
||||
3
|
||||
)
|
||||
logger.DebugLog(currentQuestion, 'actions', 3)
|
||||
qdb = addQuestion(qdb, sName, currentQuestion)
|
||||
addQuestion(qdb, sName, currentQuestion)
|
||||
})
|
||||
|
||||
currWrites++
|
||||
@@ -129,17 +129,6 @@ function ProcessIncomingRequest(recievedData, qdb, infos, dryRun, user) {
|
||||
)
|
||||
if (currWrites >= writeAfter && !dryRun) {
|
||||
currWrites = 0
|
||||
try {
|
||||
qdb.version = infos.version
|
||||
qdb.motd = infos.motd
|
||||
logger.DebugLog(
|
||||
'version and motd set for data.json',
|
||||
'actions',
|
||||
3
|
||||
)
|
||||
} catch (err) {
|
||||
logger.Log('MOTD/Version writing/reading error!')
|
||||
}
|
||||
logger.DebugLog('Writing data.json', 'actions', 1)
|
||||
utils.WriteFile(JSON.stringify(qdb), dataFile)
|
||||
logger.Log('\tData file written', color)
|
||||
|
||||
Reference in New Issue
Block a user