feat: implement podcast discovery and management controllers and services

This commit is contained in:
Michael committed 2026-04-16 14:57:49 +02:00
1 parent 7923f4cf09
commit a993e2d658
11 files changed
+318 -183

No files matched your search

+2 -1
View File
@@ -291,7 +291,8 @@ export const subscribeFromDiscovery = async (req: Request, res: Response) => {
export const getTrendingPodcasts = async (req: Request, res: Response) => {
try {
const limit = Number(req.query.limit) || 20;
const trending = await podcastIndexService.getTrendingPodcasts(limit);
const genre = req.query.genre as string;
const trending = await podcastIndexService.getTrendingPodcasts(limit, genre);
res.json({ source: 'itunes', podcasts: trending, count: trending.length });
} catch (error: any) {
console.error('Trending podcasts error:', error.message);