Refactoring: Extract Safe module to Abstractions (#3676)

So that it can be used by plugins as well.
This commit is contained in:
d11n 2022-04-26 03:28:49 +02:00 committed by GitHub
parent 5a7b275ee3
commit 8f0ac61634
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 2 deletions

View File

@ -31,6 +31,7 @@
<None Include="icon.png" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="HtmlSanitizer" Version="5.0.372" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.3" />

View File

@ -2,7 +2,7 @@ using Ganss.XSS;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace BTCPayServer.Services
namespace BTCPayServer.Abstractions.Services
{
public class Safe
{

View File

@ -1,3 +1,4 @@
using BTCPayServer.Abstractions.Services;
using BTCPayServer.Security;
using BTCPayServer.Services;
using Microsoft.AspNetCore.Razor.TagHelpers;

View File

@ -1,5 +1,6 @@
@using Microsoft.AspNetCore.Identity
@using BTCPayServer
@using BTCPayServer.Abstractions.Services
@using BTCPayServer.Views
@using BTCPayServer.Models
@using BTCPayServer.Models.AccountViewModels
@ -8,7 +9,7 @@
@using BTCPayServer.Models.StoreViewModels
@using BTCPayServer.Data
@using Microsoft.AspNetCore.Routing;
@inject BTCPayServer.Services.Safe Safe
@inject Safe Safe
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, BTCPayServer
@addTagHelper *, BundlerMinifier.TagHelpers