From 34db9e25422a63ea499a4eff60e36e8b50d52375 Mon Sep 17 00:00:00 2001 From: R0m1k3 Date: Thu, 16 Apr 2026 12:46:22 +0200 Subject: [PATCH] feat: implement podcast controller for subscription management, discovery, and search functionality --- backend/src/controllers/podcastController.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/src/controllers/podcastController.ts b/backend/src/controllers/podcastController.ts index 65bc51e..00a6054 100644 --- a/backend/src/controllers/podcastController.ts +++ b/backend/src/controllers/podcastController.ts @@ -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',