Add auth and blacklist APIs
This commit is contained in:
17
server/actions/showBlacklist.js
Normal file
17
server/actions/showBlacklist.js
Normal file
@ -0,0 +1,17 @@
|
||||
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
|
||||
Reference in New Issue
Block a user