From 6989d1625f8e2dded440e104c31278630623b089 Mon Sep 17 00:00:00 2001 From: Kelvin Luu <51680299+0kl-usds@users.noreply.github.com> Date: Tue, 23 Jan 2024 23:40:11 -0800 Subject: [PATCH] Add in debug logs --- api/src/handlers/applicant.handler.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/api/src/handlers/applicant.handler.ts b/api/src/handlers/applicant.handler.ts index fa4f941..0026189 100644 --- a/api/src/handlers/applicant.handler.ts +++ b/api/src/handlers/applicant.handler.ts @@ -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); } };