Fix code lookup

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-05-24 21:22:58 +01:00
parent 848d96bd2e
commit 1ad96ae20d

View File

@ -31,7 +31,7 @@ async function findPisByCode(code) {
log.out(`pisServices.findPisByCode: Searching for PIS code: ${code}`); log.out(`pisServices.findPisByCode: Searching for PIS code: ${code}`);
const cleanCode = clean.removeNonNumeric(code); const cleanCode = clean.removeNonNumeric(code);
const query = { const query = {
code: cleanCode 'code': cleanCode
}; };
const search = db.query('pis', parseInt(query)); const search = db.query('pis', parseInt(query));
return await search; return await search;