Skip to content

Commit

Permalink
archived reports on profile
Browse files Browse the repository at this point in the history
  • Loading branch information
sheldor1510 committed Feb 24, 2021
1 parent bd9a4fc commit 4a2b548
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion services/qrcode.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@ function renderTemplate(req, res) {
if(err) {
console.log(err)
}
const tests = user[0].tests
const updatedTests = []
for(let i = 0; i < tests.length; i++) {
if(tests[i].archived == false) {
updatedTests.push(tests[i])
}
}
const context = {
"name": user[0].name,
"pfp": user[0].pfpUrl,
"tests": user[0].tests
"tests": updatedTests
}
res.render('profile', context)
})
Expand Down

0 comments on commit 4a2b548

Please sign in to comment.