Where should be input data validation? I see you not made any:
in addNewPokemon: const newPokemon = new Pokemon(req.body); isn't excatly safe because we can put anything into body and it will fail when persisting into DB.
I am trying to find out good way to split logic...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Where should be input data validation? I see you not made any:
in addNewPokemon:
const newPokemon = new Pokemon(req.body);
isn't excatly safe because we can put anything into body and it will fail when persisting into DB.I am trying to find out good way to split logic...