From e8aafa97c1f379d20ebcd7751a5d15751acb9a59 Mon Sep 17 00:00:00 2001 From: xiaor2 Date: Fri, 5 Apr 2024 22:41:29 -0500 Subject: [PATCH] Connected the chaincode's upload function to the backend Signed-off-by: xiaor2 --- src/dashboard/src/pages/ChainCode/ChainCode.js | 2 +- src/dashboard/src/services/chaincode.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dashboard/src/pages/ChainCode/ChainCode.js b/src/dashboard/src/pages/ChainCode/ChainCode.js index 019f3cf6e..254116c8c 100644 --- a/src/dashboard/src/pages/ChainCode/ChainCode.js +++ b/src/dashboard/src/pages/ChainCode/ChainCode.js @@ -105,7 +105,7 @@ const UploadChainCode = props => { id: 'app.chainCode.form.create.file', defaultMessage: 'Package', })} - name="chaincodePackage" + name="file" getValueFromEvent={normFile} rules={[ { diff --git a/src/dashboard/src/services/chaincode.js b/src/dashboard/src/services/chaincode.js index 10902b3aa..3bc417fd6 100644 --- a/src/dashboard/src/services/chaincode.js +++ b/src/dashboard/src/services/chaincode.js @@ -7,7 +7,7 @@ export async function listChainCode(params) { } export async function uploadChainCode(params) { - return request('/api/v1/chaincodes/package', { + return request('/api/v1/chaincodes/chaincodeRepo', { method: 'POST', body: params, });