From f8fdc22bb044d51b4062f61dbf568642bd200252 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Sun, 21 May 2023 23:00:23 +0200 Subject: [PATCH] Reactivated old asp.net logs. Fixed empty config bug in the oauth2service --- Moonlight/App/Services/OAuth2Service.cs | 3 +++ Moonlight/Program.cs | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Moonlight/App/Services/OAuth2Service.cs b/Moonlight/App/Services/OAuth2Service.cs index 3a014b41..0dcc309d 100644 --- a/Moonlight/App/Services/OAuth2Service.cs +++ b/Moonlight/App/Services/OAuth2Service.cs @@ -42,6 +42,9 @@ public class OAuth2Service string.IsNullOrEmpty(displayName) ? StringHelper.CapitalizeFirstCharacter(id) : displayName; + if(Configs.All(x => x.Id != id)) + return; + var provider = Activator.CreateInstance()! as OAuth2Provider; if (provider == null) diff --git a/Moonlight/Program.cs b/Moonlight/Program.cs index 2d48a4a2..28a2e9cb 100644 --- a/Moonlight/Program.cs +++ b/Moonlight/Program.cs @@ -46,8 +46,8 @@ namespace Moonlight // Switch to logging.net injection // TODO: Enable in production - builder.Logging.ClearProviders(); - builder.Logging.AddProvider(new LogMigratorProvider()); + //builder.Logging.ClearProviders(); + //builder.Logging.AddProvider(new LogMigratorProvider()); // Add services to the container. builder.Services.AddRazorPages();