Skip to content

Commit cc2d65d

Browse files
committed
one line destructuring of req.body
1 parent b600b9b commit cc2d65d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server/controllers/user.controller.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ export function findUserByUsername(username, cb) {
3636
}
3737

3838
export function createUser(req, res, next) {
39-
const { username, email } = req.body;
40-
const { password } = req.body;
39+
const { username, email, password } = req.body;
4140
const emailLowerCase = email.toLowerCase();
4241
const EMAIL_VERIFY_TOKEN_EXPIRY_TIME = Date.now() + 3600000 * 24; // 24 hours
4342
random((tokenError, token) => {

0 commit comments

Comments
 (0)