Skip to content

Commit

Permalink
Code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
damienbod committed Sep 12, 2024
1 parent 6be909f commit de7e154
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions UiApp/CallLegacyViaProxy/LegacyViaProxyService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.Identity.Web;
using Microsoft.Identity.Web;
using Newtonsoft.Json.Linq;
using System.Net.Http.Headers;

Expand All @@ -11,8 +10,8 @@ public class LegacyViaProxyService
private readonly ITokenAcquisition _tokenAcquisition;
private readonly IConfiguration _configuration;

public LegacyViaProxyService(IHttpClientFactory clientFactory,
ITokenAcquisition tokenAcquisition,
public LegacyViaProxyService(IHttpClientFactory clientFactory,
ITokenAcquisition tokenAcquisition,
IConfiguration configuration)
{
_clientFactory = clientFactory;
Expand All @@ -25,7 +24,7 @@ public async Task<JArray> GetApiDataAsync()
var client = _clientFactory.CreateClient();

var scope = _configuration["AspNetCoreProxy:ScopeForAccessToken"];
if(scope == null) throw new ArgumentException(nameof(scope));
if (scope == null) throw new ArgumentException(nameof(scope));

var accessToken = await _tokenAcquisition.GetAccessTokenForUserAsync(new[] { scope });

Expand Down
2 changes: 1 addition & 1 deletion UiApp/Pages/Error.cshtml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using System.Diagnostics;

namespace UIApp.Pages;

Expand Down
2 changes: 1 addition & 1 deletion UiApp/Pages/Index.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ namespace UIApp.Pages;
public class IndexModel : PageModel
{
public void OnGet()
{
{
}
}

0 comments on commit de7e154

Please sign in to comment.