From a7488d12faaee3cbdc345db78c5197f47c755d9e Mon Sep 17 00:00:00 2001 From: mat-ng Date: Wed, 20 Mar 2024 20:30:58 -0400 Subject: [PATCH] fix linting issues --- .../delegation-algorithm/src/index.ts | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/backend/typescript/delegation-algorithm/src/index.ts b/backend/typescript/delegation-algorithm/src/index.ts index dc96f3b..1702b46 100644 --- a/backend/typescript/delegation-algorithm/src/index.ts +++ b/backend/typescript/delegation-algorithm/src/index.ts @@ -1,4 +1,4 @@ -import { sequelize } from "../../models"; +import { sequelize } from '../../models'; import Application from '../../models/application.model'; import ApplicationDashboardModel from '../../models/applicationDashboard.model'; @@ -16,22 +16,26 @@ async function delegationAlgorithm() { const uniquePairs = roundRobinPairs(reviewers); const totalPairs = assignApplicationsToPairs(uniquePairs, applications); - await Promise.all(applications.map(async function (application, i) { - return Promise.all(totalPairs[i].map(async function (reviewer) { - await ApplicationDashboardModel.create({ - applicationId: application.id, - reviewerId: reviewer.id, - reviewerEmail: reviewer.email, - passionFSG: 0, - teamPlayer: 0, - desireToLearn: 0, - skill: 0, - skillCategory: 'junior', - reviewerComments: '', - recommendedSecondChoice: 'N/A' - }); - })); - })); + await Promise.all( + applications.map(async function (application, i) { + return Promise.all( + totalPairs[i].map(async function (reviewer) { + await ApplicationDashboardModel.create({ + applicationId: application.id, + reviewerId: reviewer.id, + reviewerEmail: reviewer.email, + passionFSG: 0, + teamPlayer: 0, + desireToLearn: 0, + skill: 0, + skillCategory: 'junior', + reviewerComments: '', + recommendedSecondChoice: 'N/A' + }); + }) + ); + }) + ); } async function loadReviewers(): Promise {