Skip to content

Commit

Permalink
Fixed # bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasschmedtmann committed Jul 12, 2019
1 parent a1dbc48 commit c3608d0
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 5 deletions.
8 changes: 7 additions & 1 deletion 4-natours/after-section-10/controllers/authController.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ const createSendToken = (user, statusCode, res) => {
};

exports.# = catchAsync(async (req, res, next) => {
const newUser = await User.create(req.body);
const newUser = await User.create({
name: req.body.name,
email: req.body.email,
password: req.body.password,
passwordConfirm: req.body.passwordConfirm
});

createSendToken(newUser, 201, res);
});

Expand Down
8 changes: 7 additions & 1 deletion 4-natours/after-section-11/controllers/authController.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ const createSendToken = (user, statusCode, res) => {
};

exports.# = catchAsync(async (req, res, next) => {
const newUser = await User.create(req.body);
const newUser = await User.create({
name: req.body.name,
email: req.body.email,
password: req.body.password,
passwordConfirm: req.body.passwordConfirm
});

createSendToken(newUser, 201, res);
});

Expand Down
8 changes: 7 additions & 1 deletion 4-natours/after-section-12/controllers/authController.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ const createSendToken = (user, statusCode, res) => {
};

exports.# = catchAsync(async (req, res, next) => {
const newUser = await User.create(req.body);
const newUser = await User.create({
name: req.body.name,
email: req.body.email,
password: req.body.password,
passwordConfirm: req.body.passwordConfirm
});

createSendToken(newUser, 201, res);
});

Expand Down
7 changes: 6 additions & 1 deletion 4-natours/after-section-13/controllers/authController.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ const createSendToken = (user, statusCode, res) => {
};

exports.# = catchAsync(async (req, res, next) => {
const newUser = await User.create(req.body);
const newUser = await User.create({
name: req.body.name,
email: req.body.email,
password: req.body.password,
passwordConfirm: req.body.passwordConfirm
});

const url = `${req.protocol}://${req.get('host')}/me`;
console.log(url);
Expand Down
7 changes: 6 additions & 1 deletion 4-natours/after-section-14/controllers/authController.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ const createSendToken = (user, statusCode, req, res) => {
};

exports.# = catchAsync(async (req, res, next) => {
const newUser = await User.create(req.body);
const newUser = await User.create({
name: req.body.name,
email: req.body.email,
password: req.body.password,
passwordConfirm: req.body.passwordConfirm
});

const url = `${req.protocol}://${req.get('host')}/me`;
// console.log(url);
Expand Down

0 comments on commit c3608d0

Please # to comment.