xf 6 months ago
parent
commit
52bc0dfb41

+ 1 - 1
src/Hotline.Api/Controllers/KnowledgeController.cs

@@ -656,7 +656,7 @@ namespace Hotline.Api.Controllers
         public async Task<Dictionary<string, dynamic>> GetKnowretrievalBaseData()
         public async Task<Dictionary<string, dynamic>> GetKnowretrievalBaseData()
         {
         {
             return _baseDataApplication
             return _baseDataApplication
-                .KnowledgeRetrievalType([3, 4])
+                .KnowledgeRetrievalType(new[]{3, 4})
                 .Build();
                 .Build();
         }
         }
 
 

+ 1 - 1
src/Hotline.Application.Tests/Infrastructure/TestSettingConstants.cs

@@ -16,7 +16,7 @@ public static class TestSessionConstants
 
 
     public static string OpenId = "";
     public static string OpenId = "";
 
 
-    public static string[] Roles = [];
+    public static string[] Roles = Array.Empty<string>();
 
 
     public static string UserName = "";
     public static string UserName = "";
 
 

+ 2 - 2
src/Hotline.Application.Tests/TestBase.cs

@@ -65,9 +65,9 @@ public class TestBase
                 Name = name,
                 Name = name,
                 OrgId = orgId,
                 OrgId = orgId,
                 PhoneNo = phoneNo,
                 PhoneNo = phoneNo,
-                RoleIds = [roleId],
+                RoleIds = new[] { roleId },
                 UserType = userType,
                 UserType = userType,
-                UserName = userName 
+                UserName = userName
             };
             };
             var accountId = await _userController.Add(newUser);
             var accountId = await _userController.Add(newUser);
             TestSessionConstants.UserId = accountId;
             TestSessionConstants.UserId = accountId;