fix(backend): include EpisodeSeen in season episodes and add entry credits endpoint

- Add getEntryCredits service method returning all cast + crew with People, ordered by cast_type, order, episode_count
- Add getEntryCredits controller method
- Add GET /entries/:id/credits route in entry.routes.js
- Include EpisodeSeen association in getSeasonEpisodes so seen dates are returned to frontend
This commit is contained in:
Mohammed Abad committed 2026-04-29 16:04:10 +01:00
1 parent e460290b9b
commit 22d111ef71
7 files changed
+51 -3

No files matched your search

+7
View File
@@ -99,6 +99,13 @@ class EntryController {
res.status(200).json(seasons);
});
// * GET - Get ALL credits (cast + crew) for an entry
getEntryCredits = asyncWrapper(async (req, res) => {
const { id } = req.params;
const credits = await _entryService.getEntryCredits(id);
res.status(200).json(credits);
});
// * PUT - REQUEST ENTRY REFRECH
refrechEntry = asyncWrapper(async (req, res, next) => {
const { id } = req.params;