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',