Sort by added time

This commit is contained in:
nikola 2024-06-21 01:38:40 +02:00
parent 5ca0e342de
commit 1f7eb09651
3 changed files with 3 additions and 2 deletions

View File

@ -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);
})

View File

@ -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);
})

View File

@ -26,6 +26,7 @@
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><button class="dropdown-item" id="titleButton">Title</button></li>
<li><button class="dropdown-item" id="yearButton">Year</button></li>
<li><button class="dropdown-item" id="idButton">Added</button></li>
</ul>
</li>
<li class="nav-item">