Skip to content
Snippets Groups Projects

[#7] Friend 서비스 로직 개발

Merged 조대희 requested to merge feature/#7 into develop
1 file
+ 19
0
Compare changes
  • Side-by-side
  • Inline
+ 19
0
@@ -69,6 +69,25 @@ class friendService {
return request.update({ status: 'ACCEPTED '});
}
/**
* 친구 요청 거절
*/
async rejectFriendRequest(requestId, userId) {
const result = await Friend.destroy({
where: {
id: requestId,
friend_id: userId,
status: 'PENDING'
}
});
if (!result) {
throw new Error('Friend reqeust not found');
}
return result;
}
}
Loading