Skip to content

Commit 755897e

Browse files
authored
Merge pull request #3027 from PiyushThapaa/issue-#3020
One line destructuring of req.body
2 parents 6cac275 + 37d811a commit 755897e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server/controllers/user.controller.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ const random = (done) => {
3030
};
3131

3232
export function createUser(req, res, next) {
33-
const { username, email } = req.body;
34-
const { password } = req.body;
33+
const { username, email, password } = req.body;
3534
const emailLowerCase = email.toLowerCase();
3635
const EMAIL_VERIFY_TOKEN_EXPIRY_TIME = Date.now() + 3600000 * 24; // 24 hours
3736
random((tokenError, token) => {

0 commit comments

Comments
 (0)