From bba0b94a8a332de98597632f08f0c3355c3353ce Mon Sep 17 00:00:00 2001 From: piyushjat Date: Fri, 5 Jan 2024 10:00:14 +0530 Subject: [PATCH] #203-issue resolved,added-role-in-user.create --- 4-natours/after-section-10/controllers/authController.js | 3 ++- 4-natours/after-section-11/controllers/authController.js | 3 ++- 4-natours/after-section-12/controllers/authController.js | 3 ++- 4-natours/after-section-14/controllers/authController.js | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/4-natours/after-section-10/controllers/authController.js b/4-natours/after-section-10/controllers/authController.js index fcba5389e..b39e1cf96 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 fcba5389e..b39e1cf96 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 1999567dd..a73245a26 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 d4f99b50b..5efe3c2a0 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`;