Background so i am currently working on a youtube clone backend project which i started to understand backend development and express better. i have had made the architecture in the standard form like controller in one directory , models in one direc...
Markdown supported · ⌘↵ to post
Mohammed Arafat
You don't need to create the middlewear to just check if video exists or not, you simply call the const video=Video.findByIdAndDelete(id); if(!video) res.status(404).json({message:"Video not found"}) and letter the success response comes, this is more better approach