mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
Fixed unpublish
This commit is contained in:
parent
820ae3f27c
commit
277f1023c9
4 changed files with 12 additions and 4 deletions
|
@ -248,8 +248,10 @@ module.exports = function(config_hash) {
|
|||
packages = [];
|
||||
|
||||
var getData = function(i) {
|
||||
storage.get_package(results[i].ref, function(err, package) {
|
||||
packages.push(package.versions[package['dist-tags'].latest]);
|
||||
storage.get_package(results[i].ref, function(err, entry) {
|
||||
if(entry) {
|
||||
packages.push(entry.versions[entry['dist-tags'].latest]);
|
||||
}
|
||||
|
||||
if(i >= results.length - 1) {
|
||||
res.send(packages);
|
||||
|
|
|
@ -17,7 +17,7 @@ LocalList.prototype = {
|
|||
this.sync();
|
||||
}
|
||||
},
|
||||
remove: function() {
|
||||
remove: function(name) {
|
||||
var i = this.list.indexOf(name);
|
||||
if(i != -1) {
|
||||
this.list.splice(i, 1);
|
||||
|
|
|
@ -103,6 +103,7 @@ Storage.prototype.remove_package = function(name, callback) {
|
|||
});
|
||||
});
|
||||
|
||||
search.remove(name);
|
||||
localList.remove(name);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,11 @@ Search.prototype = {
|
|||
author: package._npmUser.name
|
||||
});
|
||||
},
|
||||
remove: function(name) {
|
||||
this.index.remove({
|
||||
id: name
|
||||
});
|
||||
},
|
||||
reindex: function() {
|
||||
var self = this;
|
||||
this.storage.get_local(function(err, packages) {
|
||||
|
|
Loading…
Reference in a new issue