From 052f19a6fdc7e87fbec0555ed02a3505f2b503b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?old=E6=98=93?= <156663459@qq.com> Date: Sun, 29 Sep 2024 16:33:54 +0800 Subject: [PATCH] 111 --- New_College.Api/Controllers/OAuthController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/New_College.Api/Controllers/OAuthController.cs b/New_College.Api/Controllers/OAuthController.cs index bd9a5e2..c1fa122 100644 --- a/New_College.Api/Controllers/OAuthController.cs +++ b/New_College.Api/Controllers/OAuthController.cs @@ -52,7 +52,7 @@ namespace New_College.Controllers client_secret = CasdoorConfig.ClientSecret }), Encoding.UTF8, "application/json"));// - if (userinfo.code == 200 && userinfo.type == "success") + if (userinfo != null && userinfo.code == 200 && userinfo.type == "success") { var user = (await _CustomerInfoServices.Query(q => q.UUID == userinfo.result.UnionId)).FirstOrDefault(); if (user != null)