hiteshchoudhary / chai-backend

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

Using params #102

Open kumarmeet opened 5 months ago

kumarmeet commented 5 months ago

Hey Hitesh,

I need some info about in some routes we are using subsciber or userId as params, as we take care or extract from jwt then why we are getting ids in params in the form of userId. Is this intentionally or the sake of easiness.

Routes are following:

  1. router.route("/user/:userId").get(getUserTweets);
  2. router.route("/u/:subscriberId").get(getUserChannelSubscribers);
  3. router.route("/user/:userId").get(getUserPlaylists);