Skip to content
Snippets Groups Projects

[#8] Friend 컨트롤러, 라우터 로직 개발

Merged [#8] Friend 컨트롤러, 라우터 로직 개발
Merged 조대희 requested to merge feature/#8 into develop
1 file
+ 25
0
Compare changes
  • Side-by-side
  • Inline
@@ -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
Loading