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

This commit is contained in:
Michael committed 2026-04-16 12:46:22 +02:00
1 parent 7e3b43fb5c
commit 34db9e2542
1 file changed
+3 -2
+3 -2
View File
@@ -77,8 +77,9 @@ export const subscribe = async (req: Request, res: Response) => {
const subscription = new UserSubscription({
userId: req.user.id,
podcastId: podcast._id,
await subscription.save();
}
});
await subscription.save();
}
res.status(200).json({
message: existingSubscription ? 'Déjà abonné' : 'Abonnement réussi',