diff --git a/src/BUTR.Site.NexusMods.Server/Options/NexusModsOptions.cs b/src/BUTR.Site.NexusMods.Server/Options/NexusModsOptions.cs index 6c48c180..2f0d5764 100644 --- a/src/BUTR.Site.NexusMods.Server/Options/NexusModsOptions.cs +++ b/src/BUTR.Site.NexusMods.Server/Options/NexusModsOptions.cs @@ -2,13 +2,11 @@ using FluentValidation; -using System.Net.Http; - namespace BUTR.Site.NexusMods.Server.Options; public sealed class NexusModsOptionsValidator : AbstractValidator { - public NexusModsOptionsValidator(HttpClient client) + public NexusModsOptionsValidator() { RuleFor(x => x.ApiKey).NotEmpty(); } diff --git a/src/BUTR.Site.NexusMods.Server/Options/NexusModsUsersOptions.cs b/src/BUTR.Site.NexusMods.Server/Options/NexusModsUsersOptions.cs index e28a4466..472cde7b 100644 --- a/src/BUTR.Site.NexusMods.Server/Options/NexusModsUsersOptions.cs +++ b/src/BUTR.Site.NexusMods.Server/Options/NexusModsUsersOptions.cs @@ -2,13 +2,11 @@ using FluentValidation; -using System.Net.Http; - namespace BUTR.Site.NexusMods.Server.Options; public sealed class NexusModsUsersOptionsValidator : AbstractValidator { - public NexusModsUsersOptionsValidator(HttpClient client) + public NexusModsUsersOptionsValidator() { RuleFor(x => x.ClientId).NotEmpty(); RuleFor(x => x.RedirectUri).NotEmpty().IsUri(); diff --git a/src/BUTR.Site.NexusMods.Server/Startup.cs b/src/BUTR.Site.NexusMods.Server/Startup.cs index b51101e9..0c9007ef 100644 --- a/src/BUTR.Site.NexusMods.Server/Startup.cs +++ b/src/BUTR.Site.NexusMods.Server/Startup.cs @@ -114,10 +114,8 @@ public void ConfigureServices(IServiceCollection services) services.AddValidatedOptions().Bind(discordSection); services.AddValidatedOptions().Bind(steamAPISection); services.AddValidatedOptions().Bind(depotDownloaderSection); - /* - services.AddValidatedOptionsWithHttp().Bind(nexusModsSection); - services.AddValidatedOptionsWithHttp().Bind(nexusModsUsersSection); - */ + services.AddValidatedOptions().Bind(nexusModsSection); + services.AddValidatedOptions().Bind(nexusModsUsersSection); services.AddHttpClient(string.Empty).ConfigureHttpClient((_, client) => {