From a08e92725d11ba16aa416ee449de6cb746327c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?old=E6=98=93?= <156663459@qq.com> Date: Tue, 8 Oct 2024 15:26:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- New_College.Api/Controllers/OAuthController.cs | 9 +++++++++ New_College.Api/New_College.xml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/New_College.Api/Controllers/OAuthController.cs b/New_College.Api/Controllers/OAuthController.cs index 9a674ac..9f6dafd 100644 --- a/New_College.Api/Controllers/OAuthController.cs +++ b/New_College.Api/Controllers/OAuthController.cs @@ -43,6 +43,15 @@ namespace New_College.Controllers var response = new CasDoorToken(); string jwtStr = string.Empty; bool suc = false; + if (String.IsNullOrWhiteSpace(code)) + { + return new MessageModel() + { + success = false, + msg = "参数错误", + response = response + }; + } var userinfo = CasdoorHttpHelper.Http_Post>("api/syswechat/user_info", null, new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject( new CasdoorRequest() diff --git a/New_College.Api/New_College.xml b/New_College.Api/New_College.xml index 85d7f85..3bf29f5 100644 --- a/New_College.Api/New_College.xml +++ b/New_College.Api/New_College.xml @@ -278,7 +278,7 @@ 同步合并数据 - +