diff --git a/routes/index.js b/routes/index.js index e5b8ab3..5681c06 100644 --- a/routes/index.js +++ b/routes/index.js @@ -35,6 +35,11 @@ router.get('/:service/:type/:id', function(req, res) { return result.value; } }); + + items.sort(function(a, b) { + return !a.id || !b.id; + }) + items.unshift(item); res.render(type, {items: items});