public async Task <IActionResult> CreateTodo([FromBody] TodoDTO newTodo) { if (!ModelState.IsValid) { return(BadRequest()); } var isCreated = await todosService.CreateTodo(newTodo); if (isCreated == false) { return(BadRequest()); } return(Ok()); }
public async Task <IActionResult> CreateTodo([FromBody] TodoDTO newTodo) { if (!ModelState.IsValid) { return(BadRequest()); } var isCreated = await todosService.CreateTodo(newTodo); if (isCreated == false) { return(BadRequest()); } return(Ok()); }