update environment for email sender
continuous-integration/drone Build is passing Details
continuous-integration/drone/promote/production Build is passing Details

test
Dan 2023-08-10 16:18:57 -06:00
parent 6ebb32306f
commit b5fa0e62f9
1 changed files with 1 additions and 2 deletions

View File

@ -41,8 +41,7 @@ builder.Services.AddScoped<IOFBContext, OFBContext>(s => s.GetService<OFBContext
// Email Service
builder.Services.AddScoped<IEmailSender, EmailSender>(s =>
{
var options = s.GetService<IOptions<AppSettings>>();
return new EmailSender(options.Value.Environment != "Prod");
return new EmailSender(appSettings.Environment != "Prod");
});
var app = builder.Build();