In subscription.controller.js
we accessing the data from url like this
// controller to return subscriber list of a channel
const getUserChannelSubscribers = asyncHandler(async (req, res) => {
const {channelId} = req.params
})
// controller to return channel list to which user has subscribed
const getSubscribedChannels = asyncHandler(async (req, res) => {
const { subscriberId } = req.params
})
So we have to change our subscription.routes.js folder like this :
In subscription.controller.js we accessing the data from url like this
So we have to change our subscription.routes.js folder like this :