Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yagoinacio/node-desafio-2


https://github.com/yagoinacio/node-desafio-2

Last synced: 2 days ago
JSON representation

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