From 76e9c1dd4b1e70fab32b9430047651a004fb1a5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EC=A1=B0=EB=8C=80=ED=9D=AC?= <joedaehui@ajou.ac.kr>
Date: Sat, 16 Nov 2024 10:51:03 +0900
Subject: [PATCH] =?UTF-8?q?feat:=20=EB=B3=B4=EB=82=B8=20=EC=B9=9C=EA=B5=AC?=
 =?UTF-8?q?=20=EC=9A=94=EC=B2=AD=20=EB=AA=A9=EB=A1=9D=20=EC=A1=B0=ED=9A=8C?=
 =?UTF-8?q?=20(#7)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 services/friendService.js | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/services/friendService.js b/services/friendService.js
index 93f4867..7ea6d76 100644
--- a/services/friendService.js
+++ b/services/friendService.js
@@ -51,6 +51,23 @@ class friendService {
         });
     }
 
+    /**
+     * 보낸 친구 요청 목록 조회
+     */
+    async getSentRequests(userId) {
+        return Friend.findAll({
+            where: {
+                user_Id: userId,
+                status: 'PENDING'
+            },
+            include: [{
+                model: User,
+                as: 'friend',
+                attributes: ['id', 'name', 'email']
+            }]
+        });
+    }
+
     /**
      * 친구 요청 수락
      */
@@ -88,7 +105,7 @@ class friendService {
 
         return result;
     }
-    
+
 }
 
 module.exports = new FriendService();
\ No newline at end of file
-- 
GitLab