From a4fc7dd550c93fd214cd23b449e31ead7ff3080b Mon Sep 17 00:00:00 2001 From: damienbod Date: Fri, 3 Jan 2025 08:03:54 +0100 Subject: [PATCH] build --- .github/workflows/dotnet.yml | 2 +- .../Controllers/WeatherForecastController.cs | 6 +++--- .../PortalDecryptionCertificates/CallApi/ApiService.cs | 4 ++-- .../PortalDecryptionCertificates/Pages/CallApi.cshtml.cs | 1 + .../PortalDecryptionCertificates/StartupExtensions.cs | 1 + 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index c9de30b..6c8bdc4 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -26,7 +26,7 @@ jobs: run: dotnet build ./ConfidentialClientCredentialsCertificate/ConfidentialClientCredentialsCertificate.sln - name: Build DecryptionCertificates run: dotnet build ./DecryptionCertificates/DecryptionCertificates.sln - - name: Build DeviceFlowWeb + - name: Build ./DeviceFlowWeb/DeviceFlowWeb run: dotnet build ./DeviceFlowWeb/DeviceFlowWeb.sln - name: Build DownstreamApis run: dotnet build ./DownstreamApis/DownstreamApis.sln diff --git a/DecryptionCertificates/ApiDecryptionCertificates/Controllers/WeatherForecastController.cs b/DecryptionCertificates/ApiDecryptionCertificates/Controllers/WeatherForecastController.cs index 2231a97..985c2c7 100644 --- a/DecryptionCertificates/ApiDecryptionCertificates/Controllers/WeatherForecastController.cs +++ b/DecryptionCertificates/ApiDecryptionCertificates/Controllers/WeatherForecastController.cs @@ -8,10 +8,10 @@ namespace ApiDecryptionCertificates.Controllers; [Route("[controller]")] public class WeatherForecastController : ControllerBase { - private static readonly string[] Summaries = new[] - { + private static readonly string[] Summaries = + [ "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; + ]; private readonly ILogger _logger; diff --git a/DecryptionCertificates/PortalDecryptionCertificates/CallApi/ApiService.cs b/DecryptionCertificates/PortalDecryptionCertificates/CallApi/ApiService.cs index 3574f2e..47cab14 100644 --- a/DecryptionCertificates/PortalDecryptionCertificates/CallApi/ApiService.cs +++ b/DecryptionCertificates/PortalDecryptionCertificates/CallApi/ApiService.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json.Linq; using System.Net.Http.Headers; -namespace PortalDecryptionCertificates; +namespace PortalDecryptionCertificates.CallApi; public class ApiService { @@ -29,7 +29,7 @@ public async Task GetApiDataAsync() var uri = _configuration["CallApi:ApiBaseAddress"]; if (uri == null) throw new ArgumentNullException(nameof(uri)); - var accessToken = await _tokenAcquisition.GetAccessTokenForUserAsync(new[] { scope }); + var accessToken = await _tokenAcquisition.GetAccessTokenForUserAsync([scope]); client.BaseAddress = new Uri(uri); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken); diff --git a/DecryptionCertificates/PortalDecryptionCertificates/Pages/CallApi.cshtml.cs b/DecryptionCertificates/PortalDecryptionCertificates/Pages/CallApi.cshtml.cs index b49eabe..6a67bfd 100644 --- a/DecryptionCertificates/PortalDecryptionCertificates/Pages/CallApi.cshtml.cs +++ b/DecryptionCertificates/PortalDecryptionCertificates/Pages/CallApi.cshtml.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.Identity.Web; using Newtonsoft.Json.Linq; +using PortalDecryptionCertificates.CallApi; namespace PortalDecryptionCertificates.Pages; diff --git a/DecryptionCertificates/PortalDecryptionCertificates/StartupExtensions.cs b/DecryptionCertificates/PortalDecryptionCertificates/StartupExtensions.cs index ce914d5..c777ef1 100644 --- a/DecryptionCertificates/PortalDecryptionCertificates/StartupExtensions.cs +++ b/DecryptionCertificates/PortalDecryptionCertificates/StartupExtensions.cs @@ -3,6 +3,7 @@ using Microsoft.Identity.Web; using Microsoft.Identity.Web.UI; using Microsoft.IdentityModel.Logging; +using PortalDecryptionCertificates.CallApi; using Serilog; namespace PortalDecryptionCertificates;