Merge branch 'ccp-features' of https://code-repo.d4science.org/gCubeSystem/cdn-experiments into ccp-features

This commit is contained in:
dcore94 2023-06-21 15:44:59 +02:00
commit 49f95370e4
1 changed files with 4 additions and 2 deletions

View File

@ -202,11 +202,11 @@ class CCPMethodEditorController extends HTMLElement{
this.#boot.secureFetch(url, args).then( this.#boot.secureFetch(url, args).then(
(resp)=>{ (resp)=>{
if(resp.status === 201 || resp.status === 204){ if(resp.status === 201 || resp.status === 204){
return resp.json() return resp.text()
}else throw "Error saving process: " + resp.status }else throw "Error saving process: " + resp.status
}).then(data=>{ }).then(data=>{
if(!this.#isupdate){ if(!this.#isupdate){
this.#current = data this.#current = JSon.parse(data)
this.#isupdate = true this.#isupdate = true
this.#tmp_inputs = Object.keys(this.#current.inputs).map(k=>this.#current.inputs[k]) 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]) this.#tmp_outputs = Object.keys(this.#current.outputs).map(k=>this.#current.outputs[k])
@ -236,6 +236,8 @@ class CCPMethodEditorController extends HTMLElement{
return null return null
}else throw "Error deleting method: " + resp.status }else throw "Error deleting method: " + resp.status
}).then(data=>{ }).then(data=>{
this.#isupdate = false
this.initMethod()
this.unlockRender() this.unlockRender()
}).catch(err=>{ }).catch(err=>{
alert(err) alert(err)