Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex99y committed Aug 15, 2019
1 parent 6f31f5b commit b700491
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = {
let owner = this.req.session.auth, pubKey = await ursa.getPublicKey(owner.privateKey), result, Args, prescription;
try{
Args = [pubKey, inputs.hash];
// result = await fabric.invokeTransaction('mychannel','Org1MSP','secureRec', 'consumePrescription', Args);
result = await fabric.invokeTransaction('mychannel','Org1MSP','secureRec', 'consumePrescription', Args);
// Get prescription
prescription = await fabric.queryChaincode('mychannel','Org1MSP','secureRec', 'queryPrescription', [inputs.hash]);
prescription = JSON.parse(prescription[0].toString());
Expand Down
2 changes: 1 addition & 1 deletion api/controllers/services/secure-rec/prescription/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ module.exports = {
let Args = [user.publicKey, publicKey, encryptedHash];
let result = await fabric.invokeTransaction('mychannel','Org1MSP','secureRec', 'createPrescription', Args);
if (result['status'] == 'SUCCESS')
return exits.success({'success': true, 'message': 'Your prescription has been created successfully. Hyperledger transaction hash: ' + result['hash'] });
return exits.success({'success': true, 'message': 'Your prescription has been created successfully. Hyperledger transaction hash: ' + result['hash'], 'hash': encryptedHash });
else
return exits.success({'success': false, 'message': result});
}catch(err){
Expand Down

0 comments on commit b700491

Please sign in to comment.