chai-backend
chai-backend copied to clipboard
completed project But found bug or mistake that i dont know
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