Working on the persistance part of the vidly project I am able to get the files in MongoDB to update when the input should be valid, but am having troubles geting JOI to throw exceptions when the input should read as invalid (such as no name for a genre) and the documents not updating. Instead, the DB updates anyways and no error.
Knowing that the node course is outdated, I have resaerched and tried everything to get the exceptions to trigger when they should and invalid PUTs to not update the DB, but coming up short. I got the JOI validate funciton to work properly for POST GET and DELETE, but not PUT.
Any help would be appreciated!