Exemplo n.º 1
0
        public async Task <IActionResult> CreateToken([FromServices] IGitHubUserModelService gitHubUserModelService, [FromQuery] long gitHubRepositoryId)
        {
            var jsonWebToken = await _accessTokenService.CreateTokenAsync(gitHubRepositoryId);

            var listRepositoriesViewModel = await BuildListRepositoriesViewModel(gitHubUserModelService, gitHubRepositoryId, jsonWebToken);

            return(View("ListRepositories", listRepositoriesViewModel));
        }
        public async Task <IActionResult> CreateToken([FromServices] IGitHubUserModelService gitHubUserModelService, [FromQuery] long gitHubRepositoryId)
        {
            _telemetryService.CreateToken(User.FindFirst(CustomClaims.GithubLogin).Value);

            var jsonWebToken = await _accessTokenService.CreateTokenAsync(gitHubRepositoryId);

            var listRepositoriesViewModel = await BuildListRepositoriesViewModel(gitHubUserModelService, gitHubRepositoryId, jsonWebToken);

            return(View("ListRepositories", listRepositoriesViewModel));
        }