In this README file, I will write notes about the different challenges in this sections and other stuff that I consider imprtant to note out.
- Create new user model.
- Set email property:
-> require it
-> trim it
-> set type to string
-> set min lenght of 1 - Create new user. Test it.
- Query by id
- Grab Id
- Loas User mongoose model
- user.findById;
- Validate th ID using isValid
- If is not valit : 404. Send back empty body
- Queryng the databas
- Succes:
- If todo sent it back.
- If no todo send back 404 with empty body.
- Error:
- 400 - and send empty body back.