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

feat: 보낸 친구 요청 목록 조회 (#7)

parent f2c31984
No related branches found
No related tags found
2 merge requests!31Develop,!8[#7] Friend 서비스 로직 개발
......@@ -51,6 +51,23 @@ class friendService {
});
}
/**
* 보낸 친구 요청 목록 조회
*/
async getSentRequests(userId) {
return Friend.findAll({
where: {
user_Id: userId,
status: 'PENDING'
},
include: [{
model: User,
as: 'friend',
attributes: ['id', 'name', 'email']
}]
});
}
/**
* 친구 요청 수락
*/
......@@ -88,7 +105,7 @@ class friendService {
return result;
}
}
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