From 3804c2f7bb4729958ff7348e93bb485d70fb4a45 Mon Sep 17 00:00:00 2001 From: charleswrayjr Date: Sat, 13 Sep 2025 08:38:45 -0500 Subject: [PATCH] Adding auth, media, and messaging. --- src/controllers/auth.controller.js | 3 ++- src/phsdb.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/controllers/auth.controller.js b/src/controllers/auth.controller.js index 986617f..51e07e7 100644 --- a/src/controllers/auth.controller.js +++ b/src/controllers/auth.controller.js @@ -74,7 +74,8 @@ module.exports = { if (!email || !password) { return next(createError(400, !email ? 'You must provide an email to login.' : 'You must provide a password to login.')); } - const user = await db.user.find_by_email(email); + logger.warn(email, password); + const user = await db.user.find_one( { email }); logger.warn(user); if (!user || !user.is_active || user.is_deleted) { return res.status(401).send({ success: false, user: null, token: null }); diff --git a/src/phsdb.js b/src/phsdb.js index a4f8fb9..0d2170b 100755 --- a/src/phsdb.js +++ b/src/phsdb.js @@ -25,7 +25,7 @@ const log_query = (text, values, options={}) => { try{ // logger.debug(`log_query: ${text} -- With values: ${JSON.stringify(values,json_slimify)}`); // Incase you need to see the values and properties. const formattedQuery = pgp.as.format(text, values); - logger.debug( + logger.warn( `[Executing Query] ${formattedQuery} -- With values: ${JSON.stringify( values,json_slimify )}`, -- 2.43.0