mirror of
https://github.com/R0m1k3/podcastic.git
synced 2026-10-21 22:18:03 +02:00
feat: implement podcast discovery and management controllers and services
This commit is contained in:
1 parent
7923f4cf09
commit
a993e2d658
11 files changed
+318
-183
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user