From: charleswrayjr Date: Sat, 13 Sep 2025 13:38:45 +0000 (-0500) Subject: Adding auth, media, and messaging. X-Git-Url: https://git.phasecustomsoft.com/static/git-logo.png?a=commitdiff_plain;h=3804c2f7bb4729958ff7348e93bb485d70fb4a45;p=phs-api.git Adding auth, media, and messaging. --- 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 )}`,