public async Task <ActionResult> UpdateTitle([FromRoute] int bookId, [FromBody] string title) { bool didUpdate = await _bookCommands.UpdateTitle(bookId, title); if (didUpdate) { return(NoContent()); } else { return(NotFound()); } }
public async Task <ActionResult> UpdateTitle([FromRoute] int bookId, [FromBody] string title) { bool didUpdate = await _bookCommands.UpdateTitle(bookId, title); if (didUpdate) { return(NoContent()); } else { // is the title not null ** is it less than 200 characters, if not - 400 return(NotFound()); } }