mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-06 07:34:26 +01:00
Prepare startup.cs for netcoreapp3.0
This commit is contained in:
@@ -5,7 +5,10 @@ using BTCPayServer.Models.AppViewModels;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
#if !NETCOREAPP21
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
#endif
|
||||
|
||||
namespace BTCPayServer.Services.Apps
|
||||
{
|
||||
@@ -67,9 +70,14 @@ namespace BTCPayServer.Services.Apps
|
||||
{
|
||||
return request.GetRelativePathOrAbsolute("/apps/hub");
|
||||
}
|
||||
#if NETCOREAPP21
|
||||
public static void Register(HubRouteBuilder route)
|
||||
#else
|
||||
public static void Register(IEndpointRouteBuilder route)
|
||||
#endif
|
||||
{
|
||||
route.MapHub<AppHub>("/apps/hub");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ using BTCPayServer.Data;
|
||||
using BTCPayServer.Services.Invoices;
|
||||
using BTCPayServer.Services.Stores;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Internal;
|
||||
|
||||
namespace BTCPayServer.Services.PaymentRequests
|
||||
{
|
||||
@@ -133,7 +132,7 @@ namespace BTCPayServer.Services.PaymentRequests
|
||||
{
|
||||
using (var context = _ContextFactory.CreateContext())
|
||||
{
|
||||
var canDelete = !EnumerableExtensions.Any((await GetInvoicesForPaymentRequest(id)));
|
||||
var canDelete = !(await GetInvoicesForPaymentRequest(id)).Any();
|
||||
if (!canDelete) return false;
|
||||
var pr = await FindPaymentRequest(id, userId);
|
||||
if (pr == null)
|
||||
|
||||
Reference in New Issue
Block a user