From 18d2a10708ff13deb83aa65814db332c73989420 Mon Sep 17 00:00:00 2001 From: Keane Chan Date: Fri, 21 Oct 2022 15:33:07 +0800 Subject: [PATCH] [resumes][feat] update top upvoted comment count --- apps/portal/src/server/router/resumes/resumes-resume-router.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/portal/src/server/router/resumes/resumes-resume-router.ts b/apps/portal/src/server/router/resumes/resumes-resume-router.ts index bda6464f..fe3b1d57 100644 --- a/apps/portal/src/server/router/resumes/resumes-resume-router.ts +++ b/apps/portal/src/server/router/resumes/resumes-resume-router.ts @@ -213,7 +213,8 @@ export const resumesRouter = createRouter() let topUpvotedCommentCount = 0; for (const resume of resumes) { - let highestVoteCount = 1; + // Set minimum upvote count >= 5 to qualify + let highestVoteCount = 5; // Get Map of {userId, voteCount} for each comment const commentUpvotePairs = [];