Convert to file-scoped namespace

This commit is contained in:
Dennis Reimann
2024-04-04 11:00:18 +02:00
parent c7a8523b77
commit 620ebc751c
11 changed files with 2590 additions and 2601 deletions

View File

@@ -16,8 +16,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NBitcoin; using NBitcoin;
namespace BTCPayServer.Controllers namespace BTCPayServer.Controllers;
{
public partial class UIStoresController public partial class UIStoresController
{ {
[HttpGet("{storeId}")] [HttpGet("{storeId}")]
@@ -168,4 +168,3 @@ namespace BTCPayServer.Controllers
} }
} }
}

View File

@@ -15,8 +15,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using MimeKit; using MimeKit;
namespace BTCPayServer.Controllers namespace BTCPayServer.Controllers;
{
public partial class UIStoresController public partial class UIStoresController
{ {
[HttpGet("{storeId}/emails")] [HttpGet("{storeId}/emails")]
@@ -266,4 +266,3 @@ namespace BTCPayServer.Controllers
return emailSender is not null && (await emailSender.GetEmailSettings())?.IsComplete() == true; return emailSender is not null && (await emailSender.GetEmailSettings())?.IsComplete() == true;
} }
} }
}

View File

@@ -13,8 +13,8 @@ using Microsoft.AspNetCore.Mvc;
using NBitcoin; using NBitcoin;
using NBitcoin.DataEncoders; using NBitcoin.DataEncoders;
namespace BTCPayServer.Controllers namespace BTCPayServer.Controllers;
{
public partial class UIStoresController public partial class UIStoresController
{ {
private async Task<Data.WebhookDeliveryData?> LastDeliveryForWebhook(string webhookId) private async Task<Data.WebhookDeliveryData?> LastDeliveryForWebhook(string webhookId)
@@ -188,4 +188,3 @@ namespace BTCPayServer.Controllers
return File(delivery.GetBlob().Request, "application/json"); return File(delivery.GetBlob().Request, "application/json");
} }
} }
}

View File

@@ -16,8 +16,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
namespace BTCPayServer.Controllers namespace BTCPayServer.Controllers;
{
public partial class UIStoresController public partial class UIStoresController
{ {
[HttpGet("{storeId}/lightning/{cryptoCode}")] [HttpGet("{storeId}/lightning/{cryptoCode}")]
@@ -340,4 +340,3 @@ namespace BTCPayServer.Controllers
return store.GetPaymentMethodConfig<T>(paymentMethodId, _handlers); return store.GetPaymentMethodConfig<T>(paymentMethodId, _handlers);
} }
} }
}

View File

@@ -24,8 +24,8 @@ using NBXplorer.DerivationStrategy;
using NBXplorer.Models; using NBXplorer.Models;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
namespace BTCPayServer.Controllers namespace BTCPayServer.Controllers;
{
public partial class UIStoresController public partial class UIStoresController
{ {
[HttpGet("{storeId}/onchain/{cryptoCode}")] [HttpGet("{storeId}/onchain/{cryptoCode}")]
@@ -862,4 +862,3 @@ namespace BTCPayServer.Controllers
return new DerivationSchemeSettings(strategy, network); return new DerivationSchemeSettings(strategy, network);
} }
} }
}

View File

@@ -14,8 +14,8 @@ using BTCPayServer.Rating;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
namespace BTCPayServer.Controllers namespace BTCPayServer.Controllers;
{
public partial class UIStoresController public partial class UIStoresController
{ {
[HttpGet("{storeId}/rates")] [HttpGet("{storeId}/rates")]
@@ -187,4 +187,3 @@ namespace BTCPayServer.Controllers
.OrderBy(s => s.DisplayName, StringComparer.OrdinalIgnoreCase); .OrderBy(s => s.DisplayName, StringComparer.OrdinalIgnoreCase);
} }
} }
}

View File

@@ -9,8 +9,8 @@ using BTCPayServer.Services.Stores;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
namespace BTCPayServer.Controllers namespace BTCPayServer.Controllers;
{
public partial class UIStoresController public partial class UIStoresController
{ {
[HttpGet("{storeId}/roles")] [HttpGet("{storeId}/roles")]
@@ -156,4 +156,3 @@ namespace BTCPayServer.Controllers
return RedirectToAction(nameof(ListRoles), new { storeId }); return RedirectToAction(nameof(ListRoles), new { storeId });
} }
} }
}

View File

@@ -14,8 +14,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.Rendering;
namespace BTCPayServer.Controllers namespace BTCPayServer.Controllers;
{
public partial class UIStoresController public partial class UIStoresController
{ {
[HttpGet("{storeId}/settings")] [HttpGet("{storeId}/settings")]
@@ -444,4 +444,3 @@ namespace BTCPayServer.Controllers
return defaultChoice is null ? null : choices.FirstOrDefault(c => defaultChoice.ToString().Equals(c.Value, StringComparison.OrdinalIgnoreCase)); return defaultChoice is null ? null : choices.FirstOrDefault(c => defaultChoice.ToString().Equals(c.Value, StringComparison.OrdinalIgnoreCase));
} }
} }
}

View File

@@ -14,8 +14,8 @@ using Microsoft.AspNetCore.Mvc.Rendering;
using NBitcoin; using NBitcoin;
using NBitcoin.DataEncoders; using NBitcoin.DataEncoders;
namespace BTCPayServer.Controllers namespace BTCPayServer.Controllers;
{
public partial class UIStoresController public partial class UIStoresController
{ {
[HttpGet("{storeId}/tokens")] [HttpGet("{storeId}/tokens")]
@@ -259,4 +259,3 @@ namespace BTCPayServer.Controllers
}); });
} }
} }
}

View File

@@ -14,8 +14,8 @@ using BTCPayServer.Services.Stores;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
namespace BTCPayServer.Controllers namespace BTCPayServer.Controllers;
{
public partial class UIStoresController public partial class UIStoresController
{ {
[HttpGet("{storeId}/users")] [HttpGet("{storeId}/users")]
@@ -145,4 +145,3 @@ namespace BTCPayServer.Controllers
}).ToList(); }).ToList();
} }
} }
}

View File

@@ -24,8 +24,8 @@ using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using StoreData = BTCPayServer.Data.StoreData; using StoreData = BTCPayServer.Data.StoreData;
namespace BTCPayServer.Controllers namespace BTCPayServer.Controllers;
{
[Route("stores")] [Route("stores")]
[Authorize(AuthenticationSchemes = AuthenticationSchemes.Cookie)] [Authorize(AuthenticationSchemes = AuthenticationSchemes.Cookie)]
[Authorize(Policy = Policies.CanViewStoreSettings, AuthenticationSchemes = AuthenticationSchemes.Cookie)] [Authorize(Policy = Policies.CanViewStoreSettings, AuthenticationSchemes = AuthenticationSchemes.Cookie)]
@@ -161,4 +161,3 @@ namespace BTCPayServer.Controllers
return User.Identity?.AuthenticationType != AuthenticationSchemes.Cookie ? null : _userManager.GetUserId(User); return User.Identity?.AuthenticationType != AuthenticationSchemes.Cookie ? null : _userManager.GetUserId(User);
} }
} }
}