mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Added subject and question count to questions page
This commit is contained in:
parent
5119280303
commit
cfe9706e31
2 changed files with 9 additions and 2 deletions
|
@ -140,10 +140,15 @@ app.get('/legacy', function(req, res) {
|
|||
|
||||
var f = utils.ReadFile(dataFile);
|
||||
var d = actions.LoadJSON(f);
|
||||
var raw = d.toString().split("\n");
|
||||
let qcount = 0;
|
||||
for (let i = 0; i < d.length; i++)
|
||||
qcount += d.Subjects[i].length;
|
||||
let scount = d.length;
|
||||
|
||||
res.render('alldata', {
|
||||
data: d
|
||||
data: d,
|
||||
scount: scount,
|
||||
qcount: qcount
|
||||
});
|
||||
|
||||
Log(req);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue