mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Plugins flexibility PR (#2129)
* Plugins flexibility PR * Makes the BTCPayServerOptions.LoadArgs async to support Plugin hooks and actions * relax the private set modifiers in the BTCPayNetwork * Separate IPluginHookService from PluginService to reduce dependencies on DI * fix some small bugs around image path * Fix bug with new dbreeze migration where data dir was incorrect * Update BTCPayServer/Plugins/PluginHookService.cs Co-authored-by: rockstardev <5191402+rockstardev@users.noreply.github.com> * Update BTCPayServer/Plugins/PluginHookService.cs Co-authored-by: rockstardev <5191402+rockstardev@users.noreply.github.com> Co-authored-by: rockstardev <5191402+rockstardev@users.noreply.github.com>
This commit is contained in:
@@ -70,7 +70,6 @@ namespace BTCPayServer.Hosting
|
||||
}
|
||||
public static IServiceCollection AddBTCPayServer(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
services.AddSingleton<DataDirectories>();
|
||||
services.AddSingleton<MvcNewtonsoftJsonOptions>(o => o.GetRequiredService<IOptions<MvcNewtonsoftJsonOptions>>().Value);
|
||||
services.AddDbContext<ApplicationDbContext>((provider, o) =>
|
||||
{
|
||||
@@ -244,7 +243,7 @@ namespace BTCPayServer.Hosting
|
||||
|
||||
services.TryAddSingleton<AppService>();
|
||||
services.AddSingleton<PluginService>();
|
||||
services.AddSingleton<IPluginHookService>(provider => provider.GetService<PluginService>());
|
||||
services.AddSingleton<IPluginHookService, PluginHookService>();
|
||||
services.TryAddTransient<Safe>();
|
||||
services.TryAddSingleton<Ganss.XSS.HtmlSanitizer>(o =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user