Skip to content

Kyle Baker#485

Open
kybak wants to merge 11 commits into
bloominstituteoftechnology:masterfrom
kybak:master
Open

Kyle Baker#485
kybak wants to merge 11 commits into
bloominstituteoftechnology:masterfrom
kybak:master

Conversation

@kybak

@kybak kybak commented Feb 13, 2019

Copy link
Copy Markdown

@KingAtoki

Copy link
Copy Markdown

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

Comment thread data/helpers/noteModel.js Outdated
return db('notes')
.where('id', id)
.update(changes)
.then(count => (count > 0 ? this.get(id) : null));

Copy link
Copy Markdown

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

Comment thread api/auth.js
const saltRounds = 10;

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

Copy link
Copy Markdown

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');

Comment thread api/auth.js
return res.status(400).json({ error: "Missing information" });
}

console.log('Registering');

Copy link
Copy Markdown

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');

Comment thread api/auth.js

console.log('Registering');

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

Copy link
Copy Markdown

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