public void EditToDoList(EditToDoListModel model) { User currentUser = this.GetCurrentUser(); if (currentUser.Id != model.UserId) { throw new ArgumentException("Invalid creator id"); } ToDoList selectedToDo = Task3Repo.GetToDo(model.Id); if (selectedToDo == null) { throw new ArgumentException("No such to-do"); } selectedToDo.EditContent(model.Content); }
public IActionResult EditToDoList(EditToDoListModel inputModel) { this.task3Service.EditToDoList(inputModel); return(LocalRedirect("/Task3/Login")); }