mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
[FAB-5287] NodeSDK - fix sample
Sample should use 'fcn' not 'functionName' in the sample curl calls and sample app. Change-Id: I4be92a0394fdf579195e9566d049aac0862d5888 Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
This commit is contained in:
parent
ca8fad3151
commit
e0db341af9
3 changed files with 7 additions and 7 deletions
|
|
@ -146,7 +146,7 @@ curl -s -X POST \
|
|||
"peers": ["localhost:7051"],
|
||||
"chaincodeName":"mycc",
|
||||
"chaincodeVersion":"v0",
|
||||
"functionName":"init",
|
||||
"fcn":"init",
|
||||
"args":["a","100","b","200"]
|
||||
}'
|
||||
```
|
||||
|
|
|
|||
|
|
@ -216,12 +216,12 @@ app.post('/channels/:channelName/chaincodes', function(req, res) {
|
|||
var chaincodeName = req.body.chaincodeName;
|
||||
var chaincodeVersion = req.body.chaincodeVersion;
|
||||
var channelName = req.params.channelName;
|
||||
var functionName = req.body.functionName;
|
||||
var fcn = req.body.fcn;
|
||||
var args = req.body.args;
|
||||
logger.debug('channelName : ' + channelName);
|
||||
logger.debug('chaincodeName : ' + chaincodeName);
|
||||
logger.debug('chaincodeVersion : ' + chaincodeVersion);
|
||||
logger.debug('functionName : ' + functionName);
|
||||
logger.debug('fcn : ' + fcn);
|
||||
logger.debug('args : ' + args);
|
||||
if (!chaincodeName) {
|
||||
res.json(getErrorMessage('\'chaincodeName\''));
|
||||
|
|
@ -235,15 +235,15 @@ app.post('/channels/:channelName/chaincodes', function(req, res) {
|
|||
res.json(getErrorMessage('\'channelName\''));
|
||||
return;
|
||||
}
|
||||
if (!functionName) {
|
||||
res.json(getErrorMessage('\'functionName\''));
|
||||
if (!fcn) {
|
||||
res.json(getErrorMessage('\'fcn\''));
|
||||
return;
|
||||
}
|
||||
if (!args) {
|
||||
res.json(getErrorMessage('\'args\''));
|
||||
return;
|
||||
}
|
||||
instantiate.instantiateChaincode(channelName, chaincodeName, chaincodeVersion, functionName, args, req.username, req.orgname)
|
||||
instantiate.instantiateChaincode(channelName, chaincodeName, chaincodeVersion, fcn, args, req.username, req.orgname)
|
||||
.then(function(message) {
|
||||
res.send(message);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ curl -s -X POST \
|
|||
-d '{
|
||||
"chaincodeName":"mycc",
|
||||
"chaincodeVersion":"v0",
|
||||
"functionName":"init",
|
||||
"fcn":"init",
|
||||
"args":["a","100","b","200"]
|
||||
}'
|
||||
echo
|
||||
|
|
|
|||
Loading…
Reference in a new issue