mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-08-23 17:17:02 -05:00
fixed progress types not sorting
This commit is contained in:
@@ -16,16 +16,10 @@ router.get('/progress', (req, res) => {
|
||||
|
||||
progressListModel.find({}, (err, progress) => {
|
||||
if (err) return common.sendDefault404(res);
|
||||
console.log(progress);
|
||||
let games = [];
|
||||
let backends = [];
|
||||
for (const i in progress) {
|
||||
if (progress[i].isGame)
|
||||
games += progress[i];
|
||||
else
|
||||
backends += progress[i];
|
||||
}
|
||||
console.log(games + backends);
|
||||
|
||||
const games = progress.filter(i => i.isGame);
|
||||
const backends = progress.filter(i => !i.isGame);
|
||||
|
||||
res.render('progress', {
|
||||
games,
|
||||
backends,
|
||||
|
||||
Reference in New Issue
Block a user