public async Task <ActionResult <GetHeroDTO> > Update(Guid id, [FromBody] UpdateHeroDTO dto)
        {
            var updatedHero = await _heroAppService.UpdateHero(id, dto);

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

            return(NoContent());
        }
Пример #2
0
 public async Task <ActionResult <GetHeroDTO> > Update([FromBody] UpdateHeroDTO dto)
 {
     return(Ok(await _heroAppService.UpdateHero(dto)));
 }