Skip to content

Commit

Permalink
lint: remove unused parameters in examples
Browse files Browse the repository at this point in the history
closes #5113
  • Loading branch information
raksbisht authored and dougwilson committed Feb 22, 2023
1 parent 6b4c4f5 commit 3c1d605
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/error/index.js
Expand Up @@ -26,7 +26,7 @@ function error(err, req, res, next) {
res.send('Internal Server Error');
}

app.get('/', function(req, res){
app.get('/', function () {
// Caught and passed down to the errorHandler middleware
throw new Error('something broke!');
});
Expand Down
4 changes: 2 additions & 2 deletions examples/view-locals/index.js
Expand Up @@ -61,7 +61,7 @@ function users(req, res, next) {
})
}

app.get('/middleware', count, users, function(req, res, next){
app.get('/middleware', count, users, function (req, res) {
res.render('index', {
title: 'Users',
count: req.count,
Expand Down Expand Up @@ -99,7 +99,7 @@ function users2(req, res, next) {
})
}

app.get('/middleware-locals', count2, users2, function(req, res, next){
app.get('/middleware-locals', count2, users2, function (req, res) {
// you can see now how we have much less
// to pass to res.render(). If we have
// several routes related to users this
Expand Down
4 changes: 2 additions & 2 deletions examples/web-service/index.js
Expand Up @@ -72,12 +72,12 @@ var userRepos = {
// and simply expose the data

// example: http://localhost:3000/api/users/?api-key=foo
app.get('/api/users', function(req, res, next){
app.get('/api/users', function (req, res) {
res.send(users);
});

// example: http://localhost:3000/api/repos/?api-key=foo
app.get('/api/repos', function(req, res, next){
app.get('/api/repos', function (req, res) {
res.send(repos);
});

Expand Down

0 comments on commit 3c1d605

Please sign in to comment.