public IActionResult MoveFolder(MoveFolderViewModel data) { if (data.FolderId == -1 || data.NewParentId == -1) { return(RedirectToAction("Index", new { errorId = "MoveFolder", errorMsg = "Wybierz foldery" })); } var error = treeService.MoveFolder(data); if (error != null) { return(RedirectToAction("Index", new { errorId = "MoveFolder", errorMsg = error })); } return(RedirectToAction("Index")); }