expected data is now json but only for first creation

This commit is contained in:
dcore94 2023-06-21 15:42:11 +02:00
parent 0b32d8115b
commit 771294e02c
1 changed files with 2 additions and 2 deletions

View File

@ -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])