From 1693a48f8c80a11e669788054fe511caf9b8159e Mon Sep 17 00:00:00 2001 From: milimoe Date: Wed, 3 Dec 2025 21:10:12 +0800 Subject: [PATCH] 2 --- OshimaWebAPI/Controllers/FunGameController.cs | 1 - OshimaWebAPI/OshimaWebAPI.cs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/OshimaWebAPI/Controllers/FunGameController.cs b/OshimaWebAPI/Controllers/FunGameController.cs index 9f2cafe..8c0a613 100644 --- a/OshimaWebAPI/Controllers/FunGameController.cs +++ b/OshimaWebAPI/Controllers/FunGameController.cs @@ -1,6 +1,5 @@ using System.Text; using System.Text.RegularExpressions; -using System.Xml.Linq; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; diff --git a/OshimaWebAPI/OshimaWebAPI.cs b/OshimaWebAPI/OshimaWebAPI.cs index ca43db3..1f80334 100644 --- a/OshimaWebAPI/OshimaWebAPI.cs +++ b/OshimaWebAPI/OshimaWebAPI.cs @@ -237,7 +237,7 @@ namespace Oshima.FunGame.WebAPI if (objs.Length > 0 && objs[0] is WebApplication app) { _serviceScopeFactory = app.Services.GetRequiredService(); - Controller.WriteLine("获取到:IServiceScopeFactory"); + if (_serviceScopeFactory != null) Controller.WriteLine("获取到:IServiceScopeFactory"); } }