hiteshchoudhary / chai-backend

A video series on chai aur code youtube channel
4.69k stars 697 forks source link

completed project But found bug or mistake that i dont know #136

Open VishwamDhavale opened 2 months ago

VishwamDhavale commented 2 months ago

This in the subscription routes: Corrected getUserChannelSubscribers Route:

Old Path: /u/:subscriberId New Path: /c/:channelId Reason: The getUserChannelSubscribers function should retrieve subscribers of a specific channel, so it belongs under the channel route.

Corrected getSubscribedChannels Route:

Old Path: /c/:channelId New Path: /u/:subscriberId Reason: The getSubscribedChannels function should retrieve the channels a user is subscribed to, so it belongs under the user route.

This is my observations and im not sure about it please look into this Sir

router .route("/c/:channelId") .get(getUserChannelSubscribers)//here getUserChannelSubscribers should be used not getUserChannelSubscribers .post(toggleSubscription);

router.route("/u/:subscriberId").get(getSubscribedChannels);// here getSubscribedChannels should be used not getUserChannelSubscribers