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:
@@ -48,7 +48,7 @@ public class LightningAddressService
|
||||
{
|
||||
return await _memoryCache.GetOrCreateAsync(GetKey(username), async entry =>
|
||||
{
|
||||
var result = await Get(new LightningAddressQuery() {Usernames = new[] {username}});
|
||||
var result = await Get(new LightningAddressQuery() { Usernames = new[] { username } });
|
||||
return result.FirstOrDefault();
|
||||
});
|
||||
}
|
||||
@@ -61,7 +61,7 @@ public class LightningAddressService
|
||||
public async Task<bool> Set(LightningAddressData data)
|
||||
{
|
||||
await using var context = _applicationDbContextFactory.CreateContext();
|
||||
var result = (await GetCore(context, new LightningAddressQuery() {Usernames = new[] {data.Username}}))
|
||||
var result = (await GetCore(context, new LightningAddressQuery() { Usernames = new[] { data.Username } }))
|
||||
.FirstOrDefault();
|
||||
if (result is not null)
|
||||
{
|
||||
@@ -83,8 +83,9 @@ public class LightningAddressService
|
||||
public async Task<bool> Remove(string username, string? storeId = null)
|
||||
{
|
||||
await using var context = _applicationDbContextFactory.CreateContext();
|
||||
var x = (await GetCore(context, new LightningAddressQuery() {Usernames = new[] {username}})).FirstOrDefault();
|
||||
if (x is null) return true;
|
||||
var x = (await GetCore(context, new LightningAddressQuery() { Usernames = new[] { username } })).FirstOrDefault();
|
||||
if (x is null)
|
||||
return true;
|
||||
if (storeId is not null && x.StoreDataId != storeId)
|
||||
{
|
||||
return false;
|
||||
@@ -98,7 +99,7 @@ public class LightningAddressService
|
||||
|
||||
public async Task Set(LightningAddressData data, ApplicationDbContext context)
|
||||
{
|
||||
var result = (await GetCore(context, new LightningAddressQuery() {Usernames = new[] {data.Username}}))
|
||||
var result = (await GetCore(context, new LightningAddressQuery() { Usernames = new[] { data.Username } }))
|
||||
.FirstOrDefault();
|
||||
if (result is not null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user