From 771294e02cc08e1a6bd32916ccb28c144c7654d2 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Wed, 21 Jun 2023 15:42:11 +0200 Subject: [PATCH] expected data is now json but only for first creation --- ccp/js/methodeditorcontroller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ccp/js/methodeditorcontroller.js b/ccp/js/methodeditorcontroller.js index 84fe2f8..c738577 100644 --- a/ccp/js/methodeditorcontroller.js +++ b/ccp/js/methodeditorcontroller.js @@ -202,11 +202,11 @@ class CCPMethodEditorController extends HTMLElement{ this.#boot.secureFetch(url, args).then( (resp)=>{ if(resp.status === 201 || resp.status === 204){ - return resp.json() + return resp.text() }else throw "Error saving process: " + resp.status }).then(data=>{ if(!this.#isupdate){ - this.#current = data + this.#current = JSon.parse(data) this.#isupdate = true this.#tmp_inputs = Object.keys(this.#current.inputs).map(k=>this.#current.inputs[k]) this.#tmp_outputs = Object.keys(this.#current.outputs).map(k=>this.#current.outputs[k])