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());
            }
        }
Example #2
0
        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());
            }
        }