mirror of
https://github.com/R0m1k3/podcastic.git
synced 2026-10-11 17:26:20 +02:00
feat: implement podcast controller for subscription management, search, and discovery functionality
This commit is contained in:
1 parent
d81b3a6516
commit
cdc0a4671c
1 file changed
+4
-2
@@ -136,8 +136,10 @@ export const unsubscribe = async (req: Request, res: Response) => {
|
|||||||
return res.status(404).json({ message: 'Subscription not found' });
|
return res.status(404).json({ message: 'Subscription not found' });
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`[Unsubscribe] Successfully removed subscription ${subscription._id}`);
|
// Cast to any to avoid TypeScript error with ModifyResult in logs
|
||||||
res.json({ message: 'Unsubscribed successfully', deletedId: subscription._id });
|
const result = subscription as any;
|
||||||
|
console.log(`[Unsubscribe] Successfully removed subscription ${result._id}`);
|
||||||
|
res.json({ message: 'Unsubscribed successfully', deletedId: result._id });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Unsubscribe error:', error);
|
console.error('Unsubscribe error:', error);
|
||||||
res.status(500).json({ message: 'Failed to unsubscribe' });
|
res.status(500).json({ message: 'Failed to unsubscribe' });
|
||||||
|
|||||||
Reference in new issue
Block a user