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

feat: 받은 친구 목록 조회 (#7)

parent 0fc2b8ee
No related branches found
No related tags found
2 merge requests!31Develop,!8[#7] Friend 서비스 로직 개발
...@@ -33,6 +33,24 @@ class friendService { ...@@ -33,6 +33,24 @@ class friendService {
status: 'PENDING' status: 'PENDING'
}); });
} }
/**
* 받은 친구 요청 목록 조회
*/
async getReveivedRequests(userId) {
return Friend.findAll({
where: {
friend_id: userId,
status: 'PENDING'
},
include: [{
model: User,
as: 'user',
attributes: ['id', 'name', 'email']
}]
});
}
} }
module.exports = new FriendService(); module.exports = new FriendService();
\ 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