From a793862aa2b51daa87a7af3bd40fde2f3c969b3c Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Fri, 1 Nov 2024 19:47:32 +0000 Subject: [PATCH] Search by code was searching for intergers which was returning no results. Now updated to search the database with code as a string. Signed-off-by: Fred Boniface --- src/services/pis.services.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/pis.services.ts b/src/services/pis.services.ts index 7011116..57c4267 100644 --- a/src/services/pis.services.ts +++ b/src/services/pis.services.ts @@ -46,7 +46,7 @@ export async function findPisByCode( logger.debug(`pisServices.findPisByCode: Searching for PIS code: ${code}`); const cleanCode = clean.removeNonNumeric(code); const query = { - code: parseInt(cleanCode), + code: cleanCode, }; const search = db.query("pis", query); return await search;