Skip to content

Commit

Permalink
Use ES6+ arrow functions
Browse files Browse the repository at this point in the history
  • Loading branch information
cefjoeii committed Jul 19, 2017
1 parent 08916e9 commit 0ec6091
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ app.use(express.static('public'));
app.use(bodyParser.json());

// Remove this on the production
app.use(function(req, res, next) {
app.use((req, res, next) => {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
next();
Expand All @@ -39,7 +39,7 @@ app.use(function(req, res, next) {
app.use('/api/users', require('./routes/users'));

// Use express's default error handling middleware
app.use(function (err, req, res, next) {
app.use((err, req, res, next) => {
if (res.headersSent) {
return next(err);
}
Expand Down

0 comments on commit 0ec6091

Please sign in to comment.