Skip to content

Commit

Permalink
pkg update nadobe->dan.common
Browse files Browse the repository at this point in the history
  • Loading branch information
erlendoksvoll committed Oct 27, 2023
1 parent 7d124a1 commit 6f1a089
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 34 deletions.
14 changes: 3 additions & 11 deletions src/Altinn.Dan.Plugin.Pensjon/Altinn.Dan.Plugin.Pensjon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,14 @@
<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.5.0" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.3.0" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.20.0" />
<PackageReference Include="Dan.Common" Version="1.4.0" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.21.0" />
<PackageReference Include="Microsoft.Azure.Core.NewtonsoftJson" Version="1.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.6.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.14.1" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.3.0" OutputItemType="Analyzer" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.0.13" />
<PackageReference Include="Microsoft.Azure.Services.AppAuthentication" Version="1.6.2" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="6.0.1" />
<PackageReference Include="Nadobe.Common" Version="2.0.0-rc-20220330003" />
<PackageReference Include="NJsonSchema" Version="10.6.10" />
<PackageReference Include="Polly" Version="7.2.2" />
<PackageReference Include="Polly.Extensions.Http" Version="3.0.0" />
<PackageReference Include="Polly.Caching.Distributed" Version="3.0.1" />
<PackageReference Include="Polly.Caching.Serialization.Json" Version="3.0.0" />
<PackageReference Include="Polly.Extensions.Http" Version="3.0.0" />
<PackageReference Include="StackExchange.Redis" Version="2.2.88" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
Expand Down
29 changes: 11 additions & 18 deletions src/Altinn.Dan.Plugin.Pensjon/Main.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Net.Http.Json;
using System.Text;
using System.Threading.Tasks;
using Altinn.Dan.Plugin.Pensjon.Config;
using Altinn.Dan.Plugin.Pensjon.Models;
using Azure.Core.Serialization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Http;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Nadobe;
using Nadobe.Common.Exceptions;
using Nadobe.Common.Models;
using Nadobe.Common.Util;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Dan.Common;
using Dan.Common.Exceptions;
using Dan.Common.Models;
using Dan.Common.Util;

namespace Altinn.Dan.Plugin.Pensjon
{
Expand All @@ -44,11 +41,7 @@ public async Task<HttpResponseData> GetNorskPensjon(
var requestBody = await new StreamReader(req.Body).ReadToEndAsync();
var evidenceHarvesterRequest = JsonConvert.DeserializeObject<EvidenceHarvesterRequest>(requestBody);

var actionResult = await EvidenceSourceResponse.CreateResponse(null, () => GetEvidenceValuesPensjon(evidenceHarvesterRequest)) as ObjectResult;
var response = req.CreateResponse(HttpStatusCode.OK);
await response.WriteAsJsonAsync(actionResult?.Value);

return response;
return await EvidenceSourceResponse.CreateResponse(null, () => GetEvidenceValuesPensjon(evidenceHarvesterRequest));
}

private async Task<List<EvidenceValue>> GetEvidenceValuesPensjon(EvidenceHarvesterRequest evidenceHarvesterRequest)
Expand Down
8 changes: 3 additions & 5 deletions src/Altinn.Dan.Plugin.Pensjon/Metadata.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System.Collections.Generic;
using Altinn.Dan.Plugin.Pensjon.Models;
using Nadobe.Common.Interfaces;
using Nadobe.Common.Models;
using Nadobe.Common.Models.Enums;
using NJsonSchema;
using Dan.Common.Enums;
using Dan.Common.Interfaces;
using Dan.Common.Models;

namespace Altinn.Dan.Plugin.Pensjon
{
Expand Down

0 comments on commit 6f1a089

Please sign in to comment.