mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Saving questions
This commit is contained in:
parent
8d2bc709f3
commit
2998239344
3 changed files with 86 additions and 27 deletions
|
@ -296,7 +296,7 @@ export function loadJSON(
|
|||
dataDir: string
|
||||
): Array<QuestionDb> {
|
||||
return dataFiles.reduce((acc, dataFile, index) => {
|
||||
const dataPath = dataDir + dataFile.path
|
||||
const dataPath = dataDir + '/' + dataFile.path
|
||||
|
||||
if (!utils.FileExists(dataPath)) {
|
||||
utils.WriteFile(JSON.stringify([]), dataPath)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue