From 63aee61be6a1e498738f729b66a469d6d421f9e6 Mon Sep 17 00:00:00 2001 From: Vitalii Mikhailov Date: Mon, 27 May 2024 01:13:24 +0300 Subject: [PATCH] Test --- src/BUTR.Site.NexusMods.Server/Options/NexusModsOptions.cs | 4 +--- .../Options/NexusModsUsersOptions.cs | 4 +--- src/BUTR.Site.NexusMods.Server/Startup.cs | 6 ++---- 3 files changed, 4 insertions(+), 10 deletions(-) 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) => {