fix fuzzy search result - to be array as well
This commit is contained in:
@ -66,7 +66,7 @@ async function findPublisher(names, email, select, getAll = false) {
|
||||
if (result.length === 0 && names) {
|
||||
console.log("No publisher found, trying fuzzy search for '" + names + "'- email: '" + email + "'");
|
||||
const publishers = await prisma.publisher.findMany();
|
||||
result = await common.fuzzySearch(publishers, names, 0.90);
|
||||
result = [await common.fuzzySearch(publishers, names, 0.90)];
|
||||
console.log("Fuzzy search result: " + result?.firstName + " " + result?.lastName + " - " + result?.email);
|
||||
}
|
||||
//always return an array
|
||||
|
Reference in New Issue
Block a user