From cdc0a4671ce56e2b4774bca0bdafbf7f725eed67 Mon Sep 17 00:00:00 2001 From: R0m1k3 Date: Thu, 16 Apr 2026 13:32:26 +0200 Subject: [PATCH] feat: implement podcast controller for subscription management, search, and discovery functionality --- backend/src/controllers/podcastController.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/controllers/podcastController.ts b/backend/src/controllers/podcastController.ts index 1b10c78..1a8a713 100644 --- a/backend/src/controllers/podcastController.ts +++ b/backend/src/controllers/podcastController.ts @@ -136,8 +136,10 @@ export const unsubscribe = async (req: Request, res: Response) => { return res.status(404).json({ message: 'Subscription not found' }); } - console.log(`[Unsubscribe] Successfully removed subscription ${subscription._id}`); - res.json({ message: 'Unsubscribed successfully', deletedId: subscription._id }); + // Cast to any to avoid TypeScript error with ModifyResult in logs + const result = subscription as any; + console.log(`[Unsubscribe] Successfully removed subscription ${result._id}`); + res.json({ message: 'Unsubscribed successfully', deletedId: result._id }); } catch (error) { console.error('Unsubscribe error:', error); res.status(500).json({ message: 'Failed to unsubscribe' });