mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Subjinfo fix round 2
This commit is contained in:
@@ -824,9 +824,9 @@ function GetApp() {
|
|||||||
|
|
||||||
function getSimplreRes() {
|
function getSimplreRes() {
|
||||||
return {
|
return {
|
||||||
subjects: data.Subjects.length,
|
subjects: data.length,
|
||||||
questions: data.Subjects.reduce((acc, subj) => {
|
questions: data.reduce((acc, subj) => {
|
||||||
return acc + subj.Questions.length
|
return acc + subj.length
|
||||||
}, 0),
|
}, 0),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -887,8 +887,8 @@ function GetApp() {
|
|||||||
utils.AppendToFile(
|
utils.AppendToFile(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
date: utils.GetDateString(),
|
date: utils.GetDateString(),
|
||||||
subjectCount: data.Subjects.length,
|
subjectCount: data.length,
|
||||||
questionCount: data.Subjects.reduce((acc, subj) => {
|
questionCount: data.reduce((acc, subj) => {
|
||||||
return acc + subj.Questions.length
|
return acc + subj.Questions.length
|
||||||
}, 0),
|
}, 0),
|
||||||
userCount: dbtools.TableInfo(userDB, 'users').dataCount,
|
userCount: dbtools.TableInfo(userDB, 'users').dataCount,
|
||||||
|
Reference in New Issue
Block a user