hiteshchoudhary / chai-backend

A video series on chai aur code youtube channel
5.34k stars 803 forks source link

Using params #102

Open kumarmeet opened 8 months ago

kumarmeet commented 8 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);