Skip to content
Snippets Groups Projects
Commit 8aa76c45 authored by 조대희's avatar 조대희
Browse files

feat: 받은 친구 목록 조회 컨트롤러 (#8)

parent 3f91cdc7
No related branches found
No related tags found
2 merge requests!31Develop,!9[#8] Friend 컨트롤러, 라우터 로직 개발
......@@ -25,6 +25,30 @@ class friendController {
});
}
}
/**
* 받은 친구 요청 목록 조회
* GET /api/friend/requests/received
*/
async getReceivedRequests(req, res) {
try {
const userId = req.user.id;
const requests = await FriendService.getReceivedRequests(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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment