From 1f7eb09651a81671f8f8f332e92c18cfcc084ec7 Mon Sep 17 00:00:00 2001 From: nikola Date: Fri, 21 Jun 2024 01:38:40 +0200 Subject: [PATCH] Sort by added time --- controllers/gameController.js | 2 +- controllers/mediaController.js | 2 +- views/list.hbs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/controllers/gameController.js b/controllers/gameController.js index a4075a7..ffbce92 100644 --- a/controllers/gameController.js +++ b/controllers/gameController.js @@ -4,7 +4,7 @@ var { GameModel } = require('../models/mediaModel'); module.exports = { list: function (req, res) { - GameModel.find({}, { _id: 0, __v: 0 }) + GameModel.find({}, { __v: 0 }) .then(games => { return res.json(games); }) diff --git a/controllers/mediaController.js b/controllers/mediaController.js index f6fdc09..df901da 100644 --- a/controllers/mediaController.js +++ b/controllers/mediaController.js @@ -13,7 +13,7 @@ module.exports = { list: function (req, res) { const MediaModel = req.baseUrl.includes('movies') ? MovieModel : SeriesModel; - MediaModel.find({}, { _id: 0, __v: 0 }) + MediaModel.find({}, { __v: 0 }) .then(media => { return res.json(media); }) diff --git a/views/list.hbs b/views/list.hbs index 3016fcd..88118c9 100644 --- a/views/list.hbs +++ b/views/list.hbs @@ -26,6 +26,7 @@