From 16c64a29c0e94891c2206bf5d21e3927119e724a Mon Sep 17 00:00:00 2001 From: rovast Date: Tue, 19 Sep 2023 16:31:35 +0800 Subject: [PATCH] Fix payload data format Signed-off-by: rovast --- src/components/IgntCrudCreate.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/IgntCrudCreate.vue b/src/components/IgntCrudCreate.vue index df6ff14..c308b82 100644 --- a/src/components/IgntCrudCreate.vue +++ b/src/components/IgntCrudCreate.vue @@ -97,16 +97,20 @@ const submitItem = async () => { const clonePayloadForm = clone(payloadForm); clonePayloadForm["data"] = window.btoa(clonePayloadForm["data"]); + console.log("payload"); console.log(JSON.stringify(clonePayloadForm)); // wrap post data cloneFormData["index"] = ""; - cloneFormData["payload"] = clonePayloadForm; + cloneFormData["payload"] = window.btoa(JSON.stringify(clonePayloadForm)); } // auto fill device name value cloneFormData["deviceName"] = route.params.name; + console.log("Data send to chain"); + console.log(JSON.stringify(cloneFormData)); + try { await ( client[