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

feat: 친구 요청 수락 컨트롤러 (#8)

parent 0ecbfce0
Branches
No related tags found
2 merge requests!31Develop,!9[#8] Friend 컨트롤러, 라우터 로직 개발
...@@ -73,6 +73,32 @@ class friendController { ...@@ -73,6 +73,32 @@ class friendController {
}); });
} }
} }
/**
* 친구 요청 수락
* POST /api/friend/request/:requestId/accept
*/
async acceptRequest(req, res) {
try {
const userId = req.user.id;
const { requesId } = req.params;
const result = await FriendService.acceptFriendRequest(requesId, userId);
return res.status(200).json({
success: true,
data: result
});
} catch (error) {
return res.status(400).json({
success: false,
error: {
message: error.message,
code: 'REQUEST_ACCEPT_ERROR'
}
});
}
}
} }
module.exports = new friendController(); 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.
Please register or to comment