From 956c4ea8cfb43d4cbcc0fef8ac8757fdaa0670b2 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Fri, 9 May 2025 05:53:56 +0200 Subject: [PATCH] fix example --- src/controllers/api/removeFriendController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/api/removeFriendController.ts b/src/controllers/api/removeFriendController.ts index ef39e2b1..abbcaa19 100644 --- a/src/controllers/api/removeFriendController.ts +++ b/src/controllers/api/removeFriendController.ts @@ -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); };