unpkg/server/actions/showBlacklist.js

18 lines
348 B
JavaScript

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;