hiteshchoudhary / chai-backend

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

Update comment.controller.js #129

Open rahulbatham767 opened 2 months ago

rahulbatham767 commented 2 months ago

In this comment controller, I've completed all of the controllers. You can now view all comments on a video, add a comment to a video, update a comment on a video, and delete a comment from a video.

I've also added error handling for each controller to ensure that invalid requests are handled gracefully. For example, if a user tries to update a comment that doesn't exist, they will receive an error message instead of a server error.

I've also added pagination to the getVideoComments controller so that users can easily view all of the comments on a video, even if there are a lot of them.

Overall, I'm confident that this comment controller is complete and ready to be used in a production environment.