From 820c8b0dd46a8a9dd0ae717ef8ded40a5c45cc0c Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Tue, 28 Nov 2023 11:05:58 +0000 Subject: [PATCH] Prepare for testing partial tiploc matches Signed-off-by: Fred Boniface --- src/controllers/pis.controllers.js | 2 +- src/services/pis.services.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/pis.controllers.js b/src/controllers/pis.controllers.js index 144e58c..ad109a3 100644 --- a/src/controllers/pis.controllers.js +++ b/src/controllers/pis.controllers.js @@ -49,7 +49,7 @@ async function random(req, res, next) { async function testingTiplocArray(req, res, next) { let array = JSON.parse(req.params.array) - return pis.testingTiplocArray(array) + return pis.findByTiplocArray(array) } module.exports = { diff --git a/src/services/pis.services.ts b/src/services/pis.services.ts index 4feffa3..f5c4365 100644 --- a/src/services/pis.services.ts +++ b/src/services/pis.services.ts @@ -43,7 +43,7 @@ async function findPisByCode(code: string) { return await search; } -async function findByTiplocArray(tiplocArray: string[]) { +export async function findByTiplocArray(tiplocArray: string[]) { // If any of the TIPLOCS in an array is RDG4AB - Replace it with READING. // ^^ Double check those though before doing it. const query = {