Skip to content

Commit

Permalink
fix: legacy rating
Browse files Browse the repository at this point in the history
  • Loading branch information
aaliakseyenka committed Aug 29, 2023
1 parent e8780df commit 213123d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nestjs/src/courses/interviews/interviews.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class InterviewsService {

const ratingsCount = 4;
const ratings = [htmlCss, common, dataStructures, programmingTask.codeWritingLevel].filter(Boolean) as number[];
const rating = ratings.length === ratingsCount ? ratings.reduce((sum, num) => sum + num) / ratingsCount : 0;
const rating = (ratings.length === ratingsCount ? ratings.reduce((sum, num) => sum + num) / ratingsCount : 0) * 10;

return { rating, htmlCss, common, dataStructures };
}
Expand Down
2 changes: 1 addition & 1 deletion server/src/services/stageInterview.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function getInterviewRatings({ skills, programmingTask, resume }: StageIn

const ratingsCount = 4;
const ratings = [htmlCss, common, dataStructures, programmingTask.codeWritingLevel].filter(Boolean) as number[];
const rating = ratings.length === ratingsCount ? ratings.reduce((sum, num) => sum + num) / ratingsCount : 0;
const rating = (ratings.length === ratingsCount ? ratings.reduce((sum, num) => sum + num) / ratingsCount : 0) * 10;

return { rating, htmlCss, common, dataStructures };
}
Expand Down

0 comments on commit 213123d

Please sign in to comment.