Esempio n. 1
0
        public async Task <IActionResult> PutAuthor(int authorId, AuthorDTO authorDTO)
        {
            if (authorId != authorDTO.Id || authorDTO == null)
            {
                return(BadRequest());
            }

            var author = await _authorServices.EditAuthor(authorId, authorDTO);

            if (author == null)
            {
                return(NotFound());
            }

            return(NoContent());
        }