Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yagoinacio/node-desafio-2
https://github.com/yagoinacio/node-desafio-2
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/yagoinacio/node-desafio-2
- Owner: YagoInacio
- Created: 2021-04-25T15:37:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-04-25T16:21:16.000Z (over 3 years ago)
- Last Synced: 2023-11-01T13:43:00.099Z (about 1 year ago)
- Language: JavaScript
- Size: 81.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Trabalhando com Middlewares
### Requisitos
- [x] Should be able to find user by username in header and pass it to request.user
- [x] Should be able to let user create a new todo when is in free plan and have less than ten todos
- [x] Should be able to let user create infinite new todos when is in Pro plan
- [x] Should be able to put user and todo in request when both exits
- [x] Should be able to find user by id route param and pass it to request.user### Regras de Negocio
- [x] Should not be able to find a non existing user by username in header
- [x] Should not be able to let user create a new todo when is not Pro and already have ten todos
- [x] Should not be able to put user and todo in request when user does not exists
- [x] Should not be able to put user and todo in request when todo id is not uuid
- [x] Should not be able to put user and todo in request when todo does not exists
- [x] Should not be able to pass user to request.user when it does not exists