Skip to content

Week 5 Auth Exercise completed with all the routes#10

Open
marnel-mangrubang wants to merge 1 commit intopce-uw-jscript400:masterfrom
marnel-mangrubang:master
Open

Week 5 Auth Exercise completed with all the routes#10
marnel-mangrubang wants to merge 1 commit intopce-uw-jscript400:masterfrom
marnel-mangrubang:master

Conversation

@marnel-mangrubang
Copy link

Completed all of the required routes and added middleware for authentication.

Copy link
Collaborator

@bwreid bwreid left a comment

Choose a reason for hiding this comment

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

This is really excellent work! Nice job. :)

next({ status: 400, message: 'Please enter a password!' })
}else{
//If password is provided validate for its length, error out if less then minimum of 8 characters
if(password.length < 8) next({ status: 400, message: 'Invalid password length. Please enter at least 8 characters.' })
Copy link
Collaborator

Choose a reason for hiding this comment

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

For all of these, I would add a return statement here.




module.exports = { signupValidation, userAdmins, bookAdmins, reserver, returner }
Copy link
Collaborator

Choose a reason for hiding this comment

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

These are all excellent. Well done using middleware. I would say some of the names could use some work, but that's one of the hardest things to do. :)

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