李昊 4 年之前
父節點
當前提交
205063d451

+ 3 - 2
gx_api/GxPress/Api/GxPress.Api/AppControllers/UserController.cs

@@ -14,6 +14,7 @@ using GxPress.Entity;
 using GxPress.EnumConst;
 using GxPress.Repository.Interface;
 using GxPress.Repository.Interface.Friends;
+using GxPress.Request;
 using GxPress.Request.App.User;
 using GxPress.Request.User;
 using GxPress.Request.UserMiddle;
@@ -434,9 +435,9 @@ namespace GxPress.Api.AppControllers
         /// </summary>
         /// <returns></returns>
         [HttpDelete("friends")]
-        public async Task<bool> DeleteAsync(IEnumerable<int> friendsIds)
+        public async Task<bool> DeleteAsync(FriendsDeleteRequest request)
         {
-            return await friendsRepository.DeleteAsync(friendsIds, _loginContext.AccountId);
+            return await friendsRepository.DeleteAsync(request.UserIds, _loginContext.AccountId);
         }
     }
 }

+ 20 - 0
gx_api/GxPress/Model/GxPress.Request/Friends/FriendsRequest.cs

@@ -0,0 +1,20 @@
+using System.Collections.Generic;
+
+namespace GxPress.Request
+{
+    public class FriendsRequest
+    {
+
+    }
+    /// <summary>
+    /// 删除好友
+    /// </summary>
+    public class FriendsDeleteRequest
+    {
+        /// <summary>
+        /// 好友ID
+        /// </summary>
+        /// <value></value>
+        public List<int> UserIds { get; set; }
+    }
+}