public IActionResult EditList([FromBody] EditListDto listDto)
        {
            var userId     = User.GetUserId();
            var editedList = _listService.EditList(listDto, userId);

            if (editedList == null)
            {
                return(NotFound());
            }
            return(NoContent());
        }
Exemple #2
0
        public IActionResult EditList([FromBody] EditListDto editListDto, int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            var result = _listService.EditList(editListDto, id);

            if (!result)
            {
                return(BadRequest());
            }

            return(NoContent());
        }