features/api-cleanup #15

Merged
jtom38 merged 13 commits from features/api-cleanup into main 2023-07-29 09:47:30 -07:00
2 changed files with 9 additions and 4 deletions
Showing only changes of commit 7b24ba16f7 - Show all commits

View File

@ -3,13 +3,13 @@ using System.Security.Claims;
using System.Text; using System.Text;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
using Newsbot.Collector.Api.Domain.Results; using Newsbot.Collector.Domain.Results;
using Newsbot.Collector.Database;
using Newsbot.Collector.Domain.Entities; using Newsbot.Collector.Domain.Entities;
using Newsbot.Collector.Domain.Interfaces; using Newsbot.Collector.Domain.Interfaces;
using Newsbot.Collector.Domain.Models.Config; using Newsbot.Collector.Domain.Models.Config;
using JwtRegisteredClaimNames = Microsoft.IdentityModel.JsonWebTokens.JwtRegisteredClaimNames;
namespace Newsbot.Collector.Api.Services; namespace Newsbot.Collector.Services;
public interface IIdentityService public interface IIdentityService
{ {
@ -60,7 +60,7 @@ public class IdentityService : IIdentityService
{ {
return new AuthenticationResult return new AuthenticationResult
{ {
ErrorMessage = new[] { createdUser.Result.Errors.Select(x => x.Description).ToString() } ErrorMessage = new List<string>(createdUser.Result.Errors.Select(x => x.Description))
}; };
} }

View File

@ -11,11 +11,14 @@
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="6.15.1" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.15.1" />
<PackageReference Include="Selenium.WebDriver" Version="4.8.1" /> <PackageReference Include="Selenium.WebDriver" Version="4.8.1" />
<PackageReference Include="Selenium.WebDriver.GeckoDriver" Version="0.32.2" /> <PackageReference Include="Selenium.WebDriver.GeckoDriver" Version="0.32.2" />
<PackageReference Include="Serilog" Version="2.12.0" /> <PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" /> <PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.OpenTelemetry" Version="1.0.0-dev-00113" /> <PackageReference Include="Serilog.Sinks.OpenTelemetry" Version="1.0.0-dev-00113" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.15.1" />
<PackageReference Include="System.ServiceModel.Syndication" Version="7.0.0" /> <PackageReference Include="System.ServiceModel.Syndication" Version="7.0.0" />
</ItemGroup> </ItemGroup>
@ -23,6 +26,8 @@
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup> </PropertyGroup>
</Project> </Project>