mirror of
https://github.com/R0m1k3/podcastic.git
synced 2026-10-11 17:26:20 +02:00
feat: implement podcast controller for subscription management, discovery, and search functionality
This commit is contained in:
1 parent
7e3b43fb5c
commit
34db9e2542
1 file changed
+3
-2
@@ -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',
|
||||
|
||||
Reference in new issue
Block a user