浏览代码

搜索页bug修复

懒得勤快 6 年之前
父节点
当前提交
51be5120a2
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/Masuit.MyBlogs.Core/Controllers/SearchController.cs
  2. 1 1
      src/Masuit.MyBlogs.Core/appsettings.json

+ 1 - 1
src/Masuit.MyBlogs.Core/Controllers/SearchController.cs

@@ -77,7 +77,7 @@ namespace Masuit.MyBlogs.Core.Controllers
                 wd = wd.Trim().Replace("+", " ");
                 if (!string.IsNullOrWhiteSpace(wd) && !wd.Contains("锟斤拷"))
                 {
-                    if (HttpContext.Session.TryGetValue("search:" + wd, out _))
+                    if (!HttpContext.Session.TryGetValue("search:" + wd, out _))
                     {
                         SearchDetailsService.AddEntity(new SearchDetails
                         {

+ 1 - 1
src/Masuit.MyBlogs.Core/appsettings.json

@@ -1,7 +1,7 @@
 {
     "Logging": {
         "LogLevel": {
-            "Default": "Warning"
+            "Default": "Error"
         }
     },
     "AllowedHosts": "*",