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

index 5312ae47883c3392e02e9b30e0792712c458f1d3..f3021323989e0d0678d0e8f5dd0e7a4f3aed8e76 100644 (file)
@@ -148,6 +148,10 @@ class User extends Model {
 
   async comparePassword(password) {
     const auth = await db.authentication.find_by_user_id(this.id);
+    console.log(auth);
+    console.log(password);
+    console.log(auth.password);
+    console.log(bcrypt.compareSync(password, auth.password));
     return auth ? bcrypt.compareSync(password, auth.password) : false;
   }