Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kyle Baker #485

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Kyle Baker #485

wants to merge 11 commits into from

Conversation

kybak
Copy link

@kybak kybak commented Feb 13, 2019

@KingAtoki
Copy link

Make sure to .gitignore those node_modules and then take them out of github!

return db('notes')
.where('id', id)
.update(changes)
.then(count => (count > 0 ? this.get(id) : null));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't have to have the > 0

const saltRounds = 10;

if (!user_name || !email || !password || !name) {
console.log('Missing information');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to remove the console.log statements when commiting

Suggested change
console.log('Missing information');

return res.status(400).json({ error: "Missing information" });
}

console.log('Registering');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('Registering');


console.log('Registering');

req.body.password = await bcrypt.hash(password, saltRounds).then(hash => hash);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this .then(hash => hash); if you are just returning what you are getting, do you even need it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants