mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Code formatting updates (#4502)
* Editorconfig: Add space_before_self_closing setting This was a difference between the way dotnet-format and Rider format code. See https://www.jetbrains.com/help/rider/EditorConfig_Index.html * Editorconfig: Keep 4 spaces indentation for Swagger JSON files They are all formatted that way, let's keep it like that. * Apply dotnet-format, mostly white-space related changes
This commit is contained in:
@@ -109,11 +109,11 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
}
|
||||
|
||||
return ActivatorUtilities.CreateInstance<LocalBTCPayServerClient>(_serviceProvider,
|
||||
new LocalHttpContextAccessor() {HttpContext = context});
|
||||
new LocalHttpContextAccessor() { HttpContext = context });
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class LocalHttpContextAccessor : IHttpContextAccessor
|
||||
{
|
||||
@@ -124,7 +124,7 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
{
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
private readonly IServiceProvider _serviceProvider;
|
||||
|
||||
|
||||
|
||||
public LocalBTCPayServerClient(
|
||||
IHttpContextAccessor httpContextAccessor,
|
||||
@@ -133,7 +133,7 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
_serviceProvider = serviceProvider;
|
||||
}
|
||||
|
||||
|
||||
private T GetController<T>() where T : ControllerBase
|
||||
{
|
||||
var authoverride = new AuthorizationService(new GreenfieldAuthorizationHandler(_httpContextAccessor,
|
||||
@@ -141,7 +141,7 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
_serviceProvider.GetService<StoreRepository>(),
|
||||
_serviceProvider.GetService<IPluginHookService>()));
|
||||
|
||||
var controller = _serviceProvider.GetService<T>();
|
||||
var controller = _serviceProvider.GetService<T>();
|
||||
controller.ControllerContext.HttpContext = _httpContextAccessor.HttpContext;
|
||||
var authInterface = typeof(IAuthorizationService);
|
||||
var type = controller.GetType();
|
||||
@@ -686,7 +686,7 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
{
|
||||
return GetFromActionResult<NotificationData>(
|
||||
await GetController<GreenfieldNotificationsController>().UpdateNotification(notificationId,
|
||||
new UpdateNotification() {Seen = seen}));
|
||||
new UpdateNotification() { Seen = seen }));
|
||||
}
|
||||
|
||||
public override async Task RemoveNotification(string notificationId, CancellationToken token = default)
|
||||
@@ -1056,7 +1056,7 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
|
||||
public override async Task<OnChainWalletTransactionData> PatchOnChainWalletTransaction(string storeId,
|
||||
string cryptoCode, string transactionId,
|
||||
PatchOnChainTransactionRequest request, bool force = false,CancellationToken token = default)
|
||||
PatchOnChainTransactionRequest request, bool force = false, CancellationToken token = default)
|
||||
{
|
||||
return GetFromActionResult<OnChainWalletTransactionData>(
|
||||
await GetController<GreenfieldStoreOnChainWalletsController>().PatchOnChainWalletTransaction(storeId, cryptoCode, transactionId,
|
||||
|
||||
Reference in New Issue
Block a user