mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Duplicate remover: saving savedQuestions.json
This commit is contained in:
@@ -216,9 +216,11 @@ function updateSavedQuestionsFile(path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const savedQuestions = utils.ReadJSON(filePath)
|
const savedQuestions = utils.ReadJSON(filePath)
|
||||||
return savedQuestions.filter((sq) => {
|
const filtered = savedQuestions.filter((sq) => {
|
||||||
return utils.FileExists(path + '/' + sq.fname)
|
return utils.FileExists(path + '/' + sq.fname)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
utils.WriteFile(JSON.stringify(filtered), filePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user