public IActionResult UpdatePosition([FromRoute] Guid listId, [FromRoute] Guid itemId, [FromRoute] int position)
        {
            ToDoItemDTO updatedItemDTO;

            try
            {
                updatedItemDTO = _service.UpdatePosition(listId, itemId, position);
            }
            catch (EntityNotFoundException)
            {
                return(NotFound());
            }
            catch (BadRequestException)
            {
                return(BadRequest());
            }


            return(Ok(updatedItemDTO));
        }
Beispiel #2
0
 public JsonResult UpdatePosition(List <ToDoItemUpdatePositionViewModel> toDoItemViewModel)
 {
     toDoItemService.UpdatePosition(toDoItemViewModel);
     return(JsonHelper.SuccessJsonResult());
 }