unpkg/server/actions/showBlacklist.js

18 lines
342 B
JavaScript
Raw Normal View History

2017-11-11 20:18:13 +00:00
const BlacklistAPI = require('../BlacklistAPI')
function showBlacklist(req, res) {
BlacklistAPI.getPackages().then(
blacklist => {
res.send({ blacklist })
},
error => {
console.error(error)
res.status(500).send({
error: 'Unable to fetch blacklist'
})
}
)
}
module.exports = showBlacklist