Skip to content

Commit

Permalink
[#issue-487]Modify the request to create a node (hyperledger-cello#488)
Browse files Browse the repository at this point in the history
* [#issue-487]Modify the request to create a node
1. Change the quantity parameter to a number
2. The action parameter is passed through the message body

Signed-off-by: fengyang_sy <fengyang.09186@h3c.com>

* Update node.js

* Update index.js

* Update index.js

* Update node.js

* Update index.js

* Update index.js

Signed-off-by: fengyang_sy <fengyang.09186@h3c.com>
Signed-off-by: Yuanmao Zhu <yuanmao@ualberta.ca>
  • Loading branch information
fengyangsy authored and zhuyuanmao committed Sep 23, 2022
1 parent c9819a0 commit bc83edc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/dashboard/src/pages/Operator/Node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ const CreateNode = props => {
};

const onFinish = values => {
handleCreate(values, createCallback);
const msg = { ...values, num: parseInt(values.num, 10) };
handleCreate(msg, createCallback);
};

const formItemLayout = {
Expand Down
3 changes: 2 additions & 1 deletion src/dashboard/src/services/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ export async function deleteNode(params) {
}

export async function operateNode(params) {
return request(`/api/v1/nodes/${params.id}/operations?action=${params.message}`, {
return request(`/api/v1/nodes/${params.id}/operations`, {
method: 'POST',
data: { action: params.message },
});
}

0 comments on commit bc83edc

Please sign in to comment.