Support Legacy API Key authentication to Bitpay Invoice API

This commit is contained in:
nicolas.dorier
2018-04-29 18:28:04 +09:00
parent 9e05ad787f
commit 2848caff2e
14 changed files with 831 additions and 87 deletions

View File

@@ -86,6 +86,11 @@ namespace BTCPayServer.Data
get; set;
}
public DbSet<APIKeyData> ApiKeys
{
get; set;
}
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
var isConfigured = optionsBuilder.Options.Extensions.OfType<RelationalOptionsExtension>().Any();
@@ -112,6 +117,8 @@ namespace BTCPayServer.Data
t.StoreDataId
});
builder.Entity<APIKeyData>()
.HasIndex(o => o.StoreId);
builder.Entity<AppData>()
.HasOne(a => a.StoreData);