mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Saving data fix
This commit is contained in:
parent
8a47792bde
commit
43734fb8f7
2 changed files with 10 additions and 3 deletions
|
@ -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,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -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(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue