minor changes/fixes

This commit is contained in:
X4Lo committed 2024-05-18 15:31:20 +01:00
1 parent 04965e9123
commit 21aaead02a
7 files changed
+23 -7

No files matched your search

+5 -1
View File
@@ -88,7 +88,11 @@ episodeSeenRouter.get('/by-entry/:entryId', async (req, res) => {
}],
attributes: ['episode_number'],
}],
order: [['date_seen', 'DESC'], [Episode, 'episode_number', 'DESC']]
order: [
['date_seen', 'DESC'],
[{ model: Episode }, { model: Season }, 'season_number', 'DESC'],
// [Sequelize.literal('"Episode->Season"."season_number"'), 'DESC'], // ! or this
[Episode, 'episode_number', 'DESC']]
});
res.status(200).json(episodeSeens);