chai-backend icon indicating copy to clipboard operation
chai-backend copied to clipboard

completed project But found bug or mistake that i dont know

Open VishwamDhavale opened this issue 7 months ago • 0 comments

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

VishwamDhavale avatar Jul 01 '24 17:07 VishwamDhavale