From d8c72067bc316cd51fe9b3666038440747850a2e 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: Thu, 28 Nov 2024 20:40:58 +0900
Subject: [PATCH] =?UTF-8?q?fix:=20=EC=B9=9C=EA=B5=AC=20=EB=9D=BC=EC=9A=B0?=
 =?UTF-8?q?=ED=84=B0,=20=EC=BB=A8=ED=8A=B8=EB=A1=A4=EB=9F=AC=20enpoint,=20?=
 =?UTF-8?q?=EC=98=A4=ED=83=80=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 controllers/friendController.js | 3 ++-
 routes/friend.js                | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/controllers/friendController.js b/controllers/friendController.js
index c3eb251..ce50caf 100644
--- a/controllers/friendController.js
+++ b/controllers/friendController.js
@@ -1,4 +1,5 @@
 const FriendService = require('../services/friendService');
+const { User } = require('../models');
 
 class friendController {
         /**
@@ -20,7 +21,7 @@ class friendController {
                 }
                 const friendId = receiver.id;
                 // 친구 요청 보내기 서비스 호출
-                const friendRequest = await friendService.sendFriendRequest(userId, friendId);
+                const friendRequest = await FriendService.sendFriendRequest(userId, friendId);
                 return res.status(201).json({
                     success:true,
                     data:friendRequest
diff --git a/routes/friend.js b/routes/friend.js
index 6061959..e51c3f8 100644
--- a/routes/friend.js
+++ b/routes/friend.js
@@ -7,9 +7,9 @@ router.use(isLoggedIn);
 
 /**
  * 친구 요청 보내기
- * POST /api/friend/request/:friendId
+ * POST /api/friend/request
  */
-router.post('/request/:friendId', FriendController.sendFriendRequest);
+router.post('/request', FriendController.sendFriendRequest);
 
 /**
  * 받은 친구 요청 목록 조회
-- 
GitLab