Skip to content
Snippets Groups Projects

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

Merged [#8] Friend 컨트롤러, 라우터 로직 개발
1 file
+ 24
0
Compare changes
  • Side-by-side
  • Inline
+ 24
0
@@ -49,6 +49,30 @@ class friendController {
});
}
}
/**
* 보낸 친구 요청 목록 조회
* GET /api/friend/requests/sent
*/
async getSentRequests(req, res) {
try {
const userId = req.user.id;
const requests = await FriendService.getSentRequests(userId);
return res.status(200).json({
success: true,
data: requests
});
} 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