You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
332 B
18 lines
332 B
const tor = require('../lib/tor');
|
|
|
|
module.exports = (req, res) => {
|
|
|
|
const query = {
|
|
limit: 10
|
|
};
|
|
if(req.query.s) {
|
|
query.search = req.query.s;
|
|
} else {
|
|
query.order = '-consensus_weight';
|
|
query.running = true;
|
|
}
|
|
|
|
tor.listNodes(query).then(nodes => res.render('listing.html', {
|
|
nodes: nodes
|
|
}));
|
|
}
|
|
|