diff --git a/controllers/friendController.js b/controllers/friendController.js index 8bcc10ae982073c7f98a16f667fe27d274573e8e..b278d1ace3e11f7ec92d86c1e9e32b8c1b6b9327 100644 --- a/controllers/friendController.js +++ b/controllers/friendController.js @@ -125,6 +125,31 @@ class friendController { }); } } + + /** + * 친구 목록 조회 + * GET /api/friend/all + */ + async getFriendList(req, res) { + try { + const userId = req.user.id; + const friends = await FriendService.getFriendList(userId); + + return res.status(200).json({ + success: true, + data: friends + }); + } catch (error) { + return res.status(500).json({ + success: false, + error: { + message: error.message, + code: 'FETCH_ERROR' + } + }); + } + } + } module.exports = new friendController(); \ No newline at end of file