0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

fix: dist-tag put and delete endpoint removed

dist tags test fixes

minor-fixes: new line
This commit is contained in:
Ayush Sharma 2017-10-06 18:50:52 +05:30 committed by juanpicado
parent 7f4f7380ac
commit 6e35e10a72
2 changed files with 1 additions and 23 deletions

View file

@ -69,26 +69,4 @@ module.exports = function(route, auth, storage) {
return next({ok: 'tags updated'});
});
});
route.put('/-/package/:package/dist-tags', can('publish'), media(mime.lookup('json')), expect_json,
function(req, res, next) {
storage.replace_tags(req.params.package, req.body, function(err) {
if (err) {
return next(err);
}
res.status(201);
return next({ok: 'tags updated'});
});
});
route.delete('/-/package/:package/dist-tags', can('publish'), media(mime.lookup('json')),
function(req, res, next) {
storage.replace_tags(req.params.package, {}, function(err) {
if (err) {
return next(err);
}
res.status(201);
return next({ok: 'tags removed'});
});
});
};

View file

@ -155,7 +155,7 @@ module.exports = function() {
latest: '1.1.0',
"quux": "0.1.0"
};
assert.deepEqual(body, expected);
});
});