mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
Run dotnet format (#3244)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using BTCPayServer.Data;
|
||||
using BTCPayServer.Services.Invoices;
|
||||
using Newtonsoft.Json.Linq;
|
||||
@@ -7,23 +7,23 @@ namespace BTCPayServer
|
||||
{
|
||||
public static class UserExtensions
|
||||
{
|
||||
public static UserBlob GetBlob(this ApplicationUser user)
|
||||
public static UserBlob GetBlob(this ApplicationUser user)
|
||||
{
|
||||
var result = user.Blob == null
|
||||
? new UserBlob()
|
||||
: JObject.Parse(ZipUtils.Unzip(user.Blob)).ToObject<UserBlob>();
|
||||
return result;
|
||||
}
|
||||
public static bool SetBlob(this ApplicationUser user, UserBlob blob)
|
||||
{
|
||||
var newBytes = InvoiceRepository.ToBytes(blob);
|
||||
if (user.Blob != null && newBytes.SequenceEqual(user.Blob))
|
||||
{
|
||||
var result = user.Blob == null
|
||||
? new UserBlob()
|
||||
: JObject.Parse(ZipUtils.Unzip(user.Blob)).ToObject<UserBlob>();
|
||||
return result;
|
||||
}
|
||||
public static bool SetBlob(this ApplicationUser user, UserBlob blob)
|
||||
{
|
||||
var newBytes = InvoiceRepository.ToBytes(blob);
|
||||
if (user.Blob != null && newBytes.SequenceEqual(user.Blob))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
user.Blob = newBytes;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
user.Blob = newBytes;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class UserBlob
|
||||
|
||||
Reference in New Issue
Block a user