diff --git a/index.js b/index.js index df085cc..ca42d76 100644 --- a/index.js +++ b/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); }