Closed cassiobotaro closed 2 years ago
{.py3 hl_lines="5" title="gerenciador.py"} @app.post('/tarefas', response_model=Tarefa, status_code=status.HTTP_201_CREATED) def criar(tarefa: TarefaEntrada): nova_tarefa = tarefa.dict() nova_tarefa.update({"id": uuid4()}) TAREFAS.append(nova_tarefa) return nova_tarefa
{.py3 hl_lines="5" title="gerenciador.py"} @app.post('/tarefas', response_model=Tarefa, status_code=status.HTTP_201_CREATED) def criar(tarefa: TarefaEntrada): nova_tarefa = tarefa.dict() nova_tarefa.update({"id": uuid4()}) TAREFAS.append(nova_tarefa) return nova_tarefa