mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
@@ -76,6 +76,21 @@ namespace BTCPayServer.Security.Bitpay
|
||||
}
|
||||
}
|
||||
|
||||
public async Task RevokeLegacyAPIKeys(string storeId)
|
||||
{
|
||||
var keys = await GetLegacyAPIKeys(storeId);
|
||||
if (!keys.Any())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
using (var ctx = _Factory.CreateContext())
|
||||
{
|
||||
ctx.ApiKeys.RemoveRange(keys.Select(s => new APIKeyData() {Id = s}));
|
||||
await ctx.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<string[]> GetLegacyAPIKeys(string storeId)
|
||||
{
|
||||
using (var ctx = _Factory.CreateContext())
|
||||
|
||||
Reference in New Issue
Block a user