Backend: Add TMDB proxy routes and service methods for trending, popular, and search functionalities

This commit is contained in:
Mohammed Abad committed 2026-03-30 23:33:29 +01:00
1 parent 35835e9187
commit 236e6e06fb
6 files changed
+126 -5

No files matched your search

+5
View File
@@ -11,6 +11,11 @@ const mediaOptimizerService = require('../services/mediaOptimizerService');
// ! /entries
// ! TMDB PROXY ROUTES (must be before /:id to avoid matching)
entryRouter.get('/tmdb/trending/:type', entryController.getTmdbTrending);
entryRouter.get('/tmdb/popular/:type', entryController.getTmdbPopular);
entryRouter.get('/tmdb/search', entryController.getTmdbSearch);
entryRouter.get('/sync-series', entryController.syncSeries);
entryRouter.get('/', entryController.getAllEntries);
+5 -1
View File
@@ -6,6 +6,10 @@ const peopleController = require('../controllers/peopleController');
// ! /people
// ! TMDB PROXY ROUTES (must be before /:id to avoid matching)
peopleRouter.get('/tmdb/popular', peopleController.getTmdbPopularPeople);
peopleRouter.get('/tmdb/search', peopleController.searchTmdbPeople);
// Get all people
peopleRouter.get('/', peopleController.getAllPeople);
@@ -55,7 +59,7 @@ peopleRouter.post('/:id/media', upload, async (req, res) => {
// Generate preview for profile picture
const previewPath = await mediaOptimizerService.doGeneratePreview('people', 'profiles', fileName);
result.files.push({
type: 'profile',
original: fileName,