mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04: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:
@@ -186,7 +186,7 @@ namespace BTCPayServer.Controllers
|
||||
[HttpPost("{storeId}/users/{userId}/delete")]
|
||||
public async Task<IActionResult> DeleteStoreUserPost(string storeId, string userId)
|
||||
{
|
||||
if(await _Repo.RemoveStoreUser(storeId, userId))
|
||||
if (await _Repo.RemoveStoreUser(storeId, userId))
|
||||
TempData[WellKnownTempData.SuccessMessage] = "User removed successfully.";
|
||||
else
|
||||
{
|
||||
@@ -409,7 +409,7 @@ namespace BTCPayServer.Controllers
|
||||
public PaymentMethodOptionViewModel.Format[] GetEnabledPaymentMethodChoices(StoreData storeData)
|
||||
{
|
||||
var enabled = storeData.GetEnabledPaymentIds(_NetworkProvider);
|
||||
|
||||
|
||||
return enabled
|
||||
.Select(o =>
|
||||
new PaymentMethodOptionViewModel.Format()
|
||||
@@ -646,11 +646,11 @@ namespace BTCPayServer.Controllers
|
||||
return View(model);
|
||||
}
|
||||
blob.BrandColor = model.BrandColor;
|
||||
|
||||
|
||||
var userId = GetUserId();
|
||||
if (userId is null)
|
||||
return NotFound();
|
||||
|
||||
|
||||
if (model.LogoFile != null)
|
||||
{
|
||||
if (model.LogoFile.ContentType.StartsWith("image/", StringComparison.InvariantCulture))
|
||||
@@ -660,7 +660,7 @@ namespace BTCPayServer.Controllers
|
||||
{
|
||||
await _fileService.RemoveFile(blob.LogoFileId, userId);
|
||||
}
|
||||
|
||||
|
||||
// add new image
|
||||
try
|
||||
{
|
||||
@@ -683,7 +683,7 @@ namespace BTCPayServer.Controllers
|
||||
blob.LogoFileId = null;
|
||||
needUpdate = true;
|
||||
}
|
||||
|
||||
|
||||
if (CurrentStore.SetStoreBlob(blob))
|
||||
{
|
||||
needUpdate = true;
|
||||
@@ -743,7 +743,7 @@ namespace BTCPayServer.Controllers
|
||||
}).ToArray() ?? new AccountKeySettings[result.Item1.GetExtPubKeys().Count()];
|
||||
return derivationSchemeSettings;
|
||||
}
|
||||
|
||||
|
||||
var strategy = parser.Parse(derivationScheme);
|
||||
return new DerivationSchemeSettings(strategy, network);
|
||||
}
|
||||
@@ -915,10 +915,10 @@ namespace BTCPayServer.Controllers
|
||||
var userId = GetUserId();
|
||||
if (userId == null)
|
||||
return Challenge(AuthenticationSchemes.Cookie);
|
||||
|
||||
|
||||
if (pairingCode == null)
|
||||
return NotFound();
|
||||
|
||||
|
||||
if (selectedStore != null)
|
||||
{
|
||||
var store = await _Repo.FindStore(selectedStore, userId);
|
||||
@@ -926,14 +926,14 @@ namespace BTCPayServer.Controllers
|
||||
return NotFound();
|
||||
HttpContext.SetStoreData(store);
|
||||
}
|
||||
|
||||
|
||||
var pairing = await _TokenRepository.GetPairingAsync(pairingCode);
|
||||
if (pairing == null)
|
||||
{
|
||||
TempData[WellKnownTempData.ErrorMessage] = "Unknown pairing code";
|
||||
return RedirectToAction(nameof(UIHomeController.Index), "UIHome");
|
||||
}
|
||||
|
||||
|
||||
var stores = await _Repo.GetStoresByUserId(userId);
|
||||
return View(new PairingModel
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user