type=all for a conglomerate of all the levels
This commit is contained in:
parent
ea79f45f74
commit
2909d835ae
6
index.js
6
index.js
|
@ -108,6 +108,12 @@ app.get('/list', (req, res) => {
|
|||
list = platformerLevels;
|
||||
} else if (type === 'pending') {
|
||||
list = pendingLevels;
|
||||
} else if (type === 'all') {
|
||||
return res.json([
|
||||
...regularLevels.map(l => ({ type: 'regular', ...l })),
|
||||
...platformerLevels.map(l => ({ type: 'platformer', ...l })),
|
||||
...pendingLevels.map(l => ({ type: 'pending', ...l })),
|
||||
]);
|
||||
} else {
|
||||
return res.status(400);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue