This commit is contained in:
MICHAEL JACKSON
2017-11-25 13:25:01 -08:00
parent f3974b5e2d
commit 3a309241da
64 changed files with 635 additions and 801 deletions

View File

@ -1,5 +1,5 @@
const validateNpmPackageName = require('validate-npm-package-name')
const BlacklistAPI = require('../BlacklistAPI')
const validateNpmPackageName = require("validate-npm-package-name")
const BlacklistAPI = require("../BlacklistAPI")
function removeFromBlacklist(req, res) {
const packageName = req.packageName
@ -8,16 +8,12 @@ function removeFromBlacklist(req, res) {
removed => {
if (removed) {
const userId = req.user.jti
console.log(
`Package "${packageName}" was removed from the blacklist by ${userId}`
)
console.log(`Package "${packageName}" was removed from the blacklist by ${userId}`)
}
res.send({
ok: true,
message: `Package "${packageName}" was ${
removed ? 'removed from' : 'not in'
} the blacklist`
message: `Package "${packageName}" was ${removed ? "removed from" : "not in"} the blacklist`
})
},
error => {