public async Task <IActionResult> Report() { string sourceName = httpContextInfoProvider.GetSourceName(); int externalId = httpContextInfoProvider.GetExternalId(); int sourceId = await sourceService.GetSourceIdByName(sourceName); ProfileDTO profile = await profileService.GetProfileBySourceIdAsync(sourceId, externalId); ICollection <RepositoryReport> model = await repositoryService.GetAnalyzedRepositoriesAsync(p => p.UserId == profile.UserId); return(View("_RepositoriesReport", model)); }
public async Task <IActionResult> Profile() { string sourceName = httpContextInfoProvider.GetSourceName(); int externalId = httpContextInfoProvider.GetExternalId(); int sourceId = await sourceService.GetSourceIdByName(sourceName); int userId = await profileService.GetUserIdByExternalIdAsync(sourceId, externalId); UserDTO user = await userService.GetUserByIdAsync(userId); //countermeasures if user closed our site on profile registration form if (user == null) { return(RedirectToAction("SignOut")); } return(View(user)); }