Skip to content

Add auth - Dan Stineback#35

Open
dstineback wants to merge 13 commits into
sea-401d5-javascript:masterfrom
dstineback:add-auth
Open

Add auth - Dan Stineback#35
dstineback wants to merge 13 commits into
sea-401d5-javascript:masterfrom
dstineback:add-auth

Conversation

@dstineback
Copy link
Copy Markdown
Contributor

PR for Dan Stineback Adding Auth to two resource REST API.

if (err || user) return next(new Error('User name already used'));
newUser.save((err, user) => {
if (err) return next(new Error('Could not save user'));
res.json({message: req.body.username + ' We mad a token for you', token: user.generateToken()});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We made a token..

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