Create an owned pad and view owned pads in the drive

This commit is contained in:
yflory
2018-01-08 17:36:44 +01:00
parent 1ec41f4e09
commit 0cea5f4596
10 changed files with 131 additions and 21 deletions

View File

@@ -453,6 +453,12 @@ define([
.map(function (str) { return Number(str); });
return sorted;
};
exp.getOwnedPads = function (edPub) {
var allFiles = files[FILES_DATA];
return Object.keys(allFiles).filter(function (id) {
return allFiles[id].owners && allFiles[id].owners.indexOf(edPub) !== -1;
}).map(function (k) { return Number(k); });;
};
/**
* OPERATIONS