fix: migrated users default password
This commit is contained in:
@@ -56,7 +56,7 @@ async function login(req, res) {
|
||||
|
||||
// --- Step 2: Check migration status
|
||||
const migratedPassword = `${userCheck.customer_no}@KCCB`;
|
||||
const isMigratedUser = userCheck.password === migratedPassword;
|
||||
const isMigratedUser = userCheck.password_hash === migratedPassword;
|
||||
if (isMigratedUser) {
|
||||
if (password !== migratedPassword)
|
||||
return res.status(401).json({ error: 'Invalid credentials.' });
|
||||
|
||||
Reference in New Issue
Block a user