Skip to content

Commit

Permalink
Merge pull request #18 from mjsalinger/2-Removed-next
Browse files Browse the repository at this point in the history
2 removed next
  • Loading branch information
mjsalinger authored Nov 10, 2016
2 parents 86a7896 + 9b4ab13 commit ce03b97
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ ExpressOAuthServer.prototype.authenticate = function(options) {
})
.tap(function(token) {
res.locals.oauth = { token: token };
next();
})
.catch(function(e) {
return handleError(e, req, res);
})
.finally(next);
});
};
};

Expand Down Expand Up @@ -80,8 +80,7 @@ ExpressOAuthServer.prototype.authorize = function(options) {
})
.catch(function(e) {
return handleError(e, req, res, response);
})
.finally(next);
});
};
};

Expand Down Expand Up @@ -112,8 +111,7 @@ ExpressOAuthServer.prototype.token = function(options) {
})
.catch(function(e) {
return handleError(e, req, res, response);
})
.finally(next);
});
};
};

Expand All @@ -131,6 +129,7 @@ var handleResponse = function(req, res, response) {
*/

var handleError = function(e, req, res, response) {

if (response) {
res.set(response.headers);
}
Expand Down

0 comments on commit ce03b97

Please sign in to comment.