Skip to content

Commit 578dc82

Browse files
committed
Fix user routes
1 parent 2b9c101 commit 578dc82

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

routes/users.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ router.post('/', async (req, res) => {
3939
user.email_verification_code = generateVerificationCode();
4040
await sendVerificationEmail(user)
4141

42-
user.lastSecurityUpdate = Date.now();
42+
user.last_security_change = Date.now();
43+
user.last_email_send = Date.now();
4344

4445
user = await dbAdapter.createUser(user);
4546

@@ -84,7 +85,7 @@ router.put('/me/password', auth, async (req, res) => {
8485

8586
const salt = bcrypt.genSaltSync(10);
8687
user.password = await bcrypt.hash(req.body.newPassword, salt);
87-
user.lastSecurityUpdate = Date.now();
88+
user.last_security_change = Date.now();
8889

8990
await dbAdapter.updateUser(user);
9091

0 commit comments

Comments
 (0)