fix episodes history not being ordered
This commit is contained in:
1 parent
af8ec38b62
commit
c9881b5558
1 file changed
+2
-1
@@ -88,11 +88,12 @@ episodeSeenRouter.get('/by-entry/:entryId', async (req, res) => {
|
||||
}],
|
||||
attributes: ['episode_number'],
|
||||
}],
|
||||
order: [['date_seen', 'DESC']]
|
||||
order: [['date_seen', 'DESC'], [Episode, 'episode_number', 'DESC']]
|
||||
});
|
||||
|
||||
res.status(200).json(episodeSeens);
|
||||
} catch (error) {
|
||||
console.log(`error getting episode seen of an entry: `, error)
|
||||
res.status(500).json({ error: error.message });
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user