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

index 0dcd1dd92ea2b6ec2ffeb50a325cd989375246c4..4eb04102d588b56fe7a06256a660d4a18f568465 100644 (file)
@@ -75,10 +75,12 @@ module.exports = {
         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);
+      console.log(user);
       if (!user || !user.is_active || user.is_deleted) {
         return res.status(401).send({ success: false, user: null, token: null });
       }
       const auth = await db.authentication.find_by_user_id(user.id);
+      console.log(auth);
       if (auth.is_locked) {
         return res.status(401).send({ message: 'Your account is locked due to suspicious activity. Please contact us to continue.' });
       }