mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00
move repos and services reg out to core extensions
This commit is contained in:
@ -8,6 +8,7 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Bit.Core;
|
||||
using Stripe;
|
||||
|
||||
namespace Bit.Billing
|
||||
{
|
||||
@ -38,11 +39,22 @@ namespace Bit.Billing
|
||||
services.AddOptions();
|
||||
|
||||
// Settings
|
||||
//var globalSettings = new GlobalSettings();
|
||||
//ConfigurationBinder.Bind(Configuration.GetSection("GlobalSettings"), globalSettings);
|
||||
//services.AddSingleton(s => globalSettings);
|
||||
var globalSettings = new GlobalSettings();
|
||||
ConfigurationBinder.Bind(Configuration.GetSection("GlobalSettings"), globalSettings);
|
||||
services.AddSingleton(s => globalSettings);
|
||||
services.Configure<BillingSettings>(Configuration.GetSection("BillingSettings"));
|
||||
|
||||
// Stripe Billing
|
||||
StripeConfiguration.SetApiKey(globalSettings.StripeApiKey);
|
||||
|
||||
// Repositories
|
||||
services.AddSqlServerRepositories();
|
||||
|
||||
// Services
|
||||
services.AddBaseServices();
|
||||
services.AddDefaultServices();
|
||||
|
||||
// Mvc
|
||||
services.AddMvc();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user