Beispiel #1
0
        public async Task <ActionResult <ToastDto> > UpdateAsync(Guid id, TagDto tagDto)
        {
            try
            {
                if (tagDto == null || (tagDto.Id != id))
                {
                    return(BadRequest());
                }

                TagDto res = await dataService.UpdateAsync(id, tagDto);

                return(Ok(res));
            }
            catch (Exception e)
            {
                logger.LogError(e.Message);
                return(BadRequest(e.Message));
            }
        }