Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
Add in debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
0kl-usds committed Jan 24, 2024
1 parent a1a5b62 commit 6989d16
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion api/src/handlers/applicant.handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,18 @@ export default class ApplicantHandler {
try {
// @ts-ignore
const filePath = req.files[0].path;
logger.debug(`Processing file at location ${path.resolve(filePath)}`);
logger.debug(`Processing applicant file at location ${path.resolve(filePath)}`);
const validatedBulkApplicants: BulkUSASApplicationsDto = await USASCsvReader.parseFile(filePath);
logger.debug("File parsed");

const created: Applicant[] = await this.applicantSvc.bulkUSASUpsert(validatedBulkApplicants, assessmentHurdleId);
logger.debug("Applicants Uploaded");

res.status(201).json({ data: created, message: 'created' });

} catch (error) {
logger.debug(JSON.stringify(error));

next(error);
}
};
Expand Down

0 comments on commit 6989d16

Please sign in to comment.