]> PHS Git Server - phs-api.git/commitdiff
Adding auth, media, and messaging.
authorcharleswrayjr <charleswrayjr@gmail.com>
Sat, 13 Sep 2025 13:38:45 +0000 (08:38 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Sat, 13 Sep 2025 13:38:45 +0000 (08:38 -0500)
src/controllers/auth.controller.js
src/phsdb.js

index 986617fa1e9b4ae2e13cea169271e8672c0d6462..51e07e7c417ff9722fc232bcdc0ca1d8a2f7d612 100644 (file)
@@ -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 });
index a4f8fb9635d65de23d00fda77e5109ac64a1d0f9..0d2170bdc404d05e0b2f39b8932c24985dcc9b9b 100755 (executable)
@@ -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
       )}`,