Skip to content

Commit

Permalink
Fix connection string for Registrations (kgrzybek#321)
Browse files Browse the repository at this point in the history
* Fix connection string for Registrations

* Use the const MeetingsConnectionString in Startup Configure
  • Loading branch information
jflaga authored Apr 18, 2024
1 parent 38e49f5 commit 6f70797
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/API/CompanyName.MyMeetings.API/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public Startup(IWebHostEnvironment env)
.AddEnvironmentVariables("Meetings_")
.Build();

_loggerForApi.Information("Connection string:" + _configuration.GetConnectionString("MeetingsConnectionString"));
_loggerForApi.Information("Connection string:" + _configuration.GetConnectionString(MeetingsConnectionString));

AuthorizationChecker.CheckAllEndpoints();
}
Expand Down Expand Up @@ -146,20 +146,20 @@ private void InitializeModules(ILifetimeScope container)
var emailsConfiguration = new EmailsConfiguration(_configuration["EmailsConfiguration:FromEmail"]);

MeetingsStartup.Initialize(
_configuration.GetConnectionString("MeetingsConnectionString"),
_configuration.GetConnectionString(MeetingsConnectionString),
executionContextAccessor,
_logger,
emailsConfiguration,
null);

AdministrationStartup.Initialize(
_configuration.GetConnectionString("MeetingsConnectionString"),
_configuration.GetConnectionString(MeetingsConnectionString),
executionContextAccessor,
_logger,
null);

UserAccessStartup.Initialize(
_configuration.GetConnectionString("MeetingsConnectionString"),
_configuration.GetConnectionString(MeetingsConnectionString),
executionContextAccessor,
_logger,
emailsConfiguration,
Expand All @@ -168,14 +168,14 @@ private void InitializeModules(ILifetimeScope container)
null);

PaymentsStartup.Initialize(
_configuration.GetConnectionString("MeetingsConnectionString"),
_configuration.GetConnectionString(MeetingsConnectionString),
executionContextAccessor,
_logger,
emailsConfiguration,
null);

RegistrationsStartup.Initialize(
_configuration[MeetingsConnectionString],
_configuration.GetConnectionString(MeetingsConnectionString),
executionContextAccessor,
_logger,
emailsConfiguration,
Expand Down

0 comments on commit 6f70797

Please sign in to comment.