spee.ch/server/controllers/api/tor/index.js

26 lines
514 B
JavaScript
Raw Normal View History

const logger = require('winston');
const db = require('../../../models');
/*
Route to update and return tor exit nodes that can connect to this ip address
*/
const getTorList = (req, res) => {
db.Tor.refreshTable()
.then( result => {
logger.debug('number of records', result.length);
res.status(200).json(result);
})
.catch((error) => {
logger.error(error);
res.status(500).json({
success: false,
error,
})
});
};
module.exports = getTorList;