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:
parent
18b832ca59
commit
385c29f68d
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue