Skip to content

Commit 646b676

Browse files
committed
yarn fix
1 parent e1fa9ce commit 646b676

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

backend/typescript/graphql/resolvers/applicantRecordResolvers.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,23 @@ import ApplicantRecordService from "../../services/implementations/applicantReco
22
import IApplicantRecordService from "../../services/interfaces/applicantRecordService";
33
import { ApplicantRecordDTO } from "../../types";
44

5-
const applicantRecordService: IApplicantRecordService = new ApplicantRecordService();
5+
const applicantRecordService: IApplicantRecordService =
6+
new ApplicantRecordService();
67

78
const applicantRecordResolvers = {
89
Mutation: {
910
setApplicantRecordFlag: async (
1011
_parent: undefined,
11-
{ applicantRecordId, flagValue }: { applicantRecordId: string; flagValue: boolean },
12+
{
13+
applicantRecordId,
14+
flagValue,
15+
}: { applicantRecordId: string; flagValue: boolean },
1216
): Promise<ApplicantRecordDTO> => {
13-
const applicantRecord = await applicantRecordService.setApplicantRecordFlag(
14-
applicantRecordId, flagValue,
15-
);
17+
const applicantRecord =
18+
await applicantRecordService.setApplicantRecordFlag(
19+
applicantRecordId,
20+
flagValue,
21+
);
1622
return applicantRecord;
1723
},
1824
},

backend/typescript/graphql/types/applicantRecordType.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ const applicantRecordType = gql`
1414
}
1515
1616
extend type Mutation {
17-
setApplicantRecordFlag(applicantRecordId: String!, flagValue: Boolean!): ApplicantRecordDTO!
17+
setApplicantRecordFlag(
18+
applicantRecordId: String!
19+
flagValue: Boolean!
20+
): ApplicantRecordDTO!
1821
}
1922
`;
2023

backend/typescript/services/implementations/applicantRecordService.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ class ApplicantRecordService implements IApplicantRecordService {
1515
try {
1616
const applicantRecord = await ApplicantRecord.findByPk(applicantRecordId);
1717
if (!applicantRecord) {
18-
throw new Error(`ApplicantRecord with id ${applicantRecordId} not found.`);
18+
throw new Error(
19+
`ApplicantRecord with id ${applicantRecordId} not found.`,
20+
);
1921
}
2022
applicantRecord.isApplicantFlagged = flagValue;
2123
await applicantRecord.save();
@@ -32,7 +34,9 @@ class ApplicantRecordService implements IApplicantRecordService {
3234
};
3335
} catch (error: unknown) {
3436
Logger.error(
35-
`Failed to set applicant record flag. Reason = ${getErrorMessage(error)}`,
37+
`Failed to set applicant record flag. Reason = ${getErrorMessage(
38+
error,
39+
)}`,
3640
);
3741
throw error;
3842
}

0 commit comments

Comments
 (0)