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

            if (editedList == null)
            {
                return(NotFound());
            }
            return(NoContent());
        }
Beispiel #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());
        }