Skip to content

Commit

Permalink
add includeDisabled to list all zones (#33)
Browse files Browse the repository at this point in the history
* add includeDisabled to list all zones

* fix searching

* add catch

* remove if(err)
  • Loading branch information
skadefro authored Mar 29, 2024
1 parent 6882465 commit 433d081
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function fetchCounters(zones, callback) {

function fetchZoneList(callback) {
request(
config.apiServer + '/zones',
config.apiServer + '/zones?includeDisabled=true',
{
json: true
},
Expand Down
8 changes: 2 additions & 6 deletions routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,7 @@ router.get('/find', (req, res, next) => {
opts.previous = cursorValue;
}

MongoPaging.find(db.client.collection('mids'), opts, (err, result) => {
if (err) {
return next(err);
}

MongoPaging.find(db.client.collection('mids'), opts).then((result) => {
if (!result.hasPrevious) {
page = 1;
}
Expand All @@ -433,7 +429,7 @@ router.get('/find', (req, res, next) => {
time: entry.t.toISOString()
}))
});
});
}).catch(next);
});
});

Expand Down

0 comments on commit 433d081

Please sign in to comment.