Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
implemented resolve feature for participant objects as part of retrie…
Browse files Browse the repository at this point in the history
…ve action

Signed-off-by: marcus <wittigmarcus@gmail.com>
  • Loading branch information
mwittig committed Dec 4, 2017
1 parent df2a45b commit 58dec66
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions packages/node-red-contrib-composer/nodes/hyperledger-composer.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,20 @@ module.exports = function (RED) {
return businessNetworkConnection.getParticipantRegistry(modelName)
.then((participantRegistry) => {
node.log('got participant registry');
if (id == null) {
return assetRegistry.getAll();
}
else {
return participantRegistry.get(id);
if (resolve) {
if (id == null) {
return participantRegistry.resolveAll();
}
else {
return participantRegistry.resolve(id);
}
} else {
if (id == null) {
return participantRegistry.getAll();
}
else {
return participantRegistry.get(id);
}
}
})
.then((result) => {
Expand Down

0 comments on commit 58dec66

Please sign in to comment.