diff --git a/src/helpers/common.js b/src/helpers/common.js index 57a189f..a133fda 100644 --- a/src/helpers/common.js +++ b/src/helpers/common.js @@ -118,7 +118,7 @@ exports.getPrismaClient = function getPrismaClient() { logger.debug("getPrismaClient: process.env.DATABASE_URL = ", process.env.DATABASE_URL); prisma = new PrismaClient({ // Optional: Enable logging - log: ['query', 'info', 'warn', 'error'], + //log: ['query', 'info', 'warn', 'error'], datasources: { db: { url: process.env.DATABASE_URL } }, }); } diff --git a/src/helpers/data.js b/src/helpers/data.js index 187ee30..7c0916b 100644 --- a/src/helpers/data.js +++ b/src/helpers/data.js @@ -67,7 +67,7 @@ async function findPublisher(names, email, select, getAll = false) { 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)]; - console.log("Fuzzy search result: " + result?.firstName + " " + result?.lastName + " - " + result?.email); + console.log("Fuzzy search result: " + result[0]?.firstName + " " + result[0]?.lastName + " - " + result[0]?.email); } //always return an array result = result || [];