feat: implement podcast controller for subscription management, search, and discovery functionality

This commit is contained in:
Michael committed 2026-04-16 13:32:26 +02:00
1 parent d81b3a6516
commit cdc0a4671c
1 file changed
+4 -2
+4 -2
View File
@@ -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' });