Saving data fix

This commit is contained in:
mrfry 2020-10-07 14:25:25 +02:00
parent 8a47792bde
commit 43734fb8f7
2 changed files with 10 additions and 3 deletions

View file

@ -728,9 +728,13 @@ function GetApp() {
user user
) )
.then((result) => { .then((result) => {
const { newDb, newQuestions } = result
if (newQuestions > 0) {
data = newDb
}
res.json({ res.json({
success: result !== -1, success: newQuestions !== -1,
newQuestions: result, newQuestions: newQuestions,
}) })
}) })
}) })

View file

@ -165,7 +165,10 @@ function ProcessIncomingRequest(recievedData, qdb, infos, dryRun, user) {
logger.DebugLog(allQuestions, 'actions', 2) logger.DebugLog(allQuestions, 'actions', 2)
logger.DebugLog('ProcessIncomingRequest done', 'actions', 1) logger.DebugLog('ProcessIncomingRequest done', 'actions', 1)
resolve(allQLength.length) resolve({
newQuestions: allQLength.length,
newDb: qdb,
})
} catch (error) { } catch (error) {
console.log(error) console.log(error)
logger.Log( logger.Log(