fix example
This commit is contained in:
parent
30861756af
commit
956c4ea8cf
@ -83,7 +83,7 @@ export const removeFriendPostController: RequestHandler = async (req, res) => {
|
||||
} satisfies IRemoveFriendsResponse)
|
||||
};
|
||||
|
||||
// The friend ids format is a bit weird, e.g. when 6633b81e9dba0b714f28ff02 (A) is friends with 681c8df04773f7c2809b856c (B), A's friend id for B is 808000f04773f70530e4a0c2 and B's friend id for A is 8000b81e9dba0b06408a8075.
|
||||
// The friend ids format is a bit weird, e.g. when 6633b81e9dba0b714f28ff02 (A) is friends with 67cdac105ef1f4b49741c267 (B), A's friend id for B is 808000105ef1f40560ca079e and B's friend id for A is 8000b81e9dba0b06408a8075.
|
||||
const checkFriendId = (friendId: string, b: Types.ObjectId): boolean => {
|
||||
return friendId.substring(6, 6 + 8) == b.toString().substring(6, 6 + 8);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user