Skip to content

Commit 058faba

Browse files
committed
Merge pull request #35 from softdev0810/feature
Update user.controller.js
2 parents dafeb96 + 54f0625 commit 058faba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/controllers/user.controller.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ const signin = async (req, res) => {
7777
return res.status(404).json({ msg: "User does not exist." });
7878
}
7979

80+
if (userAccount.loginTracking) {
81+
return res.status(400).json({ msg: "User is already logged in." });
82+
}
83+
8084
// Check if the password is correct
8185
const passwordMatch = bcrypt.compareSync(
8286
password,

0 commit comments

Comments
 (0)