diff --git a/4-natours/after-section-10/controllers/authController.js b/4-natours/after-section-10/controllers/authController.js index fcba5389ed..b39e1cf964 100644 --- a/4-natours/after-section-10/controllers/authController.js +++ b/4-natours/after-section-10/controllers/authController.js @@ -41,7 +41,8 @@ exports.signup = catchAsync(async (req, res, next) => { name: req.body.name, email: req.body.email, password: req.body.password, - passwordConfirm: req.body.passwordConfirm + passwordConfirm: req.body.passwordConfirm, + role: req.body.role, }); createSendToken(newUser, 201, res); diff --git a/4-natours/after-section-11/controllers/authController.js b/4-natours/after-section-11/controllers/authController.js index fcba5389ed..b39e1cf964 100644 --- a/4-natours/after-section-11/controllers/authController.js +++ b/4-natours/after-section-11/controllers/authController.js @@ -41,7 +41,8 @@ exports.signup = catchAsync(async (req, res, next) => { name: req.body.name, email: req.body.email, password: req.body.password, - passwordConfirm: req.body.passwordConfirm + passwordConfirm: req.body.passwordConfirm, + role: req.body.role, }); createSendToken(newUser, 201, res); diff --git a/4-natours/after-section-12/controllers/authController.js b/4-natours/after-section-12/controllers/authController.js index 1999567ddd..a73245a265 100644 --- a/4-natours/after-section-12/controllers/authController.js +++ b/4-natours/after-section-12/controllers/authController.js @@ -41,7 +41,8 @@ exports.signup = catchAsync(async (req, res, next) => { name: req.body.name, email: req.body.email, password: req.body.password, - passwordConfirm: req.body.passwordConfirm + passwordConfirm: req.body.passwordConfirm, + role: req.body.role, }); createSendToken(newUser, 201, res); diff --git a/4-natours/after-section-14/controllers/authController.js b/4-natours/after-section-14/controllers/authController.js index d4f99b50b0..5efe3c2a08 100644 --- a/4-natours/after-section-14/controllers/authController.js +++ b/4-natours/after-section-14/controllers/authController.js @@ -40,7 +40,8 @@ exports.signup = catchAsync(async (req, res, next) => { name: req.body.name, email: req.body.email, password: req.body.password, - passwordConfirm: req.body.passwordConfirm + passwordConfirm: req.body.passwordConfirm, + role: req.body.role, }); const url = `${req.protocol}://${req.get('host')}/me`;