8000 More named functions for newrelic · TailorDev/assignees@2ba7a8d · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Commit

Permalink
More named functions for newrelic
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Jan 31, 2017
1 parent 1461cb8 commit 2ba7a8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ app.use(flash());

// security
app.disable('x-powered-by');
app.use((req, res, next) => {
app.use(function enableCSRF(req, res, next) {
if (req.path === '/events') {
next();
} else {
Expand Down
4 changes: 2 additions & 2 deletions config/passport.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ passport.use(new GitHubStrategy({
/**
* Login Required middleware.
*/
exports.isAuthenticated = (req, res, next) => {
exports.isAuthenticated = function isAuthenticated(req, res, next) {
if (req.isAuthenticated()) {
return next();
}
Expand All @@ -107,7 +107,7 @@ exports.isAuthenticated = (req, res, next) => {
/**
* Authorization Required middleware.
*/
exports.isAdmin = (req, res, next) => {
exports.isAdmin = function isAdmin(req, res, next) {
if (req.isAuthenticated() && req.user.isAdmin()) {
return next();
}
Expand Down

0 comments on commit 2ba7a8d

Please sign in to comment.
0