public async Task <IActionResult> Get(char splitChar, string relativePath) { var userName = User.Claims.FirstOrDefault(k => k.Type == ClaimTypes.Name); var userRole = User.Claims.FirstOrDefault(k => k.Type == ClaimTypes.Role); try { var dir = _fileExplorer.GetTargetDirectoryInfo(userRole?.Value, userName?.Value, relativePath?.Split(splitChar)); return(Ok(dir)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }