unpkg/server/actions/showBlacklist.js

18 lines
342 B
JavaScript
Raw Normal View History

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