Skip to content

Commit f9a7649

Browse files
committed
📦️ Updated outdated package and updated project from dotnet 6 to 8
1 parent f6d4836 commit f9a7649

File tree

4 files changed

+44
-10
lines changed

4 files changed

+44
-10
lines changed

FoosballApi.csproj

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
2-
32
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
3+
<TargetFramework>net8.0</TargetFramework>
54
<Nullable>disable</Nullable>
65
<ImplicitUsings>enable</ImplicitUsings>
76
</PropertyGroup>
8-
97
<ItemGroup>
108
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="11.0.0" />
119
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
@@ -15,14 +13,13 @@
1513
<PackageReference Include="Hangfire.Core" Version="1.8.14" />
1614
<PackageReference Include="Hangfire.PostgreSql" Version="1.20.8" />
1715
<PackageReference Include="MailKit" Version="3.3.0" />
18-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.5" />
19-
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="6.0.5" />
20-
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.5" />
2116
<PackageReference Include="NETCore.Encrypt" Version="2.1.1" />
2217
<PackageReference Include="Npgsql" Version="6.0.4" />
2318
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
2419
<PackageReference Include="System.Data.SqlClient" Version="4.8.3" />
25-
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.19.0" />
20+
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.6.2" />
21+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.6" />
22+
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="8.0.6" />
23+
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.6" />
2624
</ItemGroup>
27-
28-
</Project>
25+
</Project>

FoosballApi.sln

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.10.35013.160
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FoosballApi", "FoosballApi.csproj", "{118A2665-F285-4925-BAE1-F38FB52CCF67}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{118A2665-F285-4925-BAE1-F38FB52CCF67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{118A2665-F285-4925-BAE1-F38FB52CCF67}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{118A2665-F285-4925-BAE1-F38FB52CCF67}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{118A2665-F285-4925-BAE1-F38FB52CCF67}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {4D2BDAD5-4ADC-47B4-9E5C-D6E20E37A267}
24+
EndGlobalSection
25+
EndGlobal

Helpers/HttpCaller.cs

+12
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ public async Task<string> MakeApiCall(string bodyParam, string url)
1919
return result;
2020
}
2121

22+
public async Task<string> MakeApiCallSlack(string bodyParam, string url)
23+
{
24+
HttpClient client = new();
25+
26+
HttpContent requestContent = new StringContent(bodyParam, Encoding.UTF8, "application/json");
27+
var response = await client.PostAsync(url, requestContent);
28+
response.EnsureSuccessStatusCode();
29+
var result = await response.Content.ReadAsStringAsync();
30+
return result;
31+
}
32+
33+
2234
public async Task<string> CallSenderApi(string bodyParam, string url)
2335
{
2436
HttpClient client = new();

Services/FreehandGoalService.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public async Task SendSlackMessage(FreehandMatchModel match, int userId)
296296
};
297297

298298
string bodyParam = System.Text.Json.JsonSerializer.Serialize(message);
299-
await httpCaller.MakeApiCall(bodyParam, _webhookUrl);
299+
await httpCaller.MakeApiCallSlack(bodyParam, _webhookUrl);
300300
}
301301

302302
private async Task<OrganisationModel> GetOrganisationById(int id)

0 commit comments

Comments
 (0)