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:
parent
7f4f7380ac
commit
6e35e10a72
2 changed files with 1 additions and 23 deletions
|
@ -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'});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
@ -155,7 +155,7 @@ module.exports = function() {
|
|||
latest: '1.1.0',
|
||||
"quux": "0.1.0"
|
||||
};
|
||||
|
||||
|
||||
assert.deepEqual(body, expected);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue