Skip to content

Commit

Permalink
fixes v2
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasSirotek committed Dec 17, 2023
1 parent 276a679 commit bf796b7
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/Infrastructure/DependencyInjection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ public static IServiceCollection AddInfrastructureServices(this IServiceCollecti
var stripeWh = configuration.GetSection("Stripe--WHKey").Value;
var url = configuration["AzureKeyVaultUrl"];

var secretClient = new SecretClient(new Uri(url!), new DefaultAzureCredential());

var stripeApiKey = secretClient.GetSecret("Stripe--ApiKey").Value;
var stripeWhKey = secretClient.GetSecret("Stripe--WHKey").Value;

// Guard.Against.Null(stripeApiKey, message: "Connection string 'ApiKey' not found.");
// Guard.Against.Null(stripeWhKey, message: "Connection string 'WHKey' not found.");
Expand All @@ -54,15 +50,9 @@ public static IServiceCollection AddInfrastructureServices(this IServiceCollecti
};


var stripeConfig2 = new StripeConfig
{
ApiKey = stripeApiKey.Value,
WhKey = stripeWhKey.Value
};



services.AddSingleton(stripeConfig);
services.AddSingleton(stripeConfig2);

services.AddScoped<ISaveChangesInterceptor, AuditableEntityInterceptor>();

Expand Down

0 comments on commit bf796b7

Please sign in to comment.