Exemplo n.º 1
0
        public async Task <IActionResult> DeleteDirectory([FromQuery] string directoryId, bool isPrivate = false, bool hasParentDirectory = false)
        {
            var parentDirectoryId = await directoryManager.DeleteDirectory(directoryId);

            return(parentDirectoryId != null ? (!hasParentDirectory ? (IActionResult)RedirectToAction(!isPrivate ? "Public" : "Private")
                    : RedirectToAction("Directory", new { id = parentDirectoryId, isPrivate = isPrivate })).PushAlert("Directory has been deleted")
                : (!hasParentDirectory ? (IActionResult)RedirectToAction(!isPrivate ? "Public" : "Private")
                    : RedirectToAction("Directory", new { id = parentDirectoryId, isPrivate = isPrivate })));
        }