public IActionResult ChangeFileName(ChangeFileNameViewModel data) { if (data.FileId == -1) { return(RedirectToAction("Index", new { errorId = "ChangeName", errorMsg = "Wybierz plik" })); } var error = treeService.ChangeFileName(data); if (error != null) { return(RedirectToAction("Index", new { errorId = "ChangeName", errorMsg = error })); } return(RedirectToAction("Index")); }