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 262d0f9 commit 276a679
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Create EF Core migrations bundle
if: ${{ inputs.build-artifacts == true }}
run: |
dotnet new tool-manifest
dotnet new tool-manifest --force
dotnet tool install dotnet-ef
dotnet ef migrations bundle --configuration Release -p ./src/Infrastructure/ -s ./src/Web/ -o efbundle.exe
zip -r ./efbundle.zip efbundle.exe
Expand Down
13 changes: 12 additions & 1 deletion src/Infrastructure/DependencyInjection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ public static IServiceCollection AddInfrastructureServices(this IServiceCollecti
var connectionString = configuration.GetConnectionString("DefaultConnection");

Guard.Against.Null(connectionString, message: "Connection string 'DefaultConnection' not found.");


var stripeApi = configuration.GetSection("Stripe--ApiKey").Value;
var stripeWh = configuration.GetSection("Stripe--WHKey").Value;
var url = configuration["AzureKeyVaultUrl"];

var secretClient = new SecretClient(new Uri(url!), new DefaultAzureCredential());
Expand All @@ -46,12 +48,21 @@ public static IServiceCollection AddInfrastructureServices(this IServiceCollecti
// Guard.Against.Null(stripeWhKey, message: "Connection string 'WHKey' not found.");

var stripeConfig = new StripeConfig
{
ApiKey = stripeApi!,
WhKey = stripeWh!
};


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 276a679

Please sign in to comment.