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 @@ 同步合并数据 - +