Added green shadow wan success and other things (#268)
Reviewed-on: #268 Reviewed-by: Mikolaj Widla <widlam@noreply.example.com> Co-authored-by: Adam Bem <adam.bem@zoho.eu> Co-committed-by: Adam Bem <adam.bem@zoho.eu>
This commit is contained in:
@@ -47,16 +47,16 @@ function createBody(){
|
||||
|
||||
const fetchLink = document.location.protocol + "//" + document.location.hostname + "/libxml/html/" + chooseType(props.formatType);
|
||||
|
||||
function processResponse(formattedCode : any){
|
||||
var result = formattedCode.result;
|
||||
emit("update:error", formattedCode.status == "ERR")
|
||||
return result
|
||||
}
|
||||
|
||||
function process(){
|
||||
fetch(fetchLink, {body:createBody(), method: "POST"})
|
||||
.then( response => response.json() )
|
||||
.then( formattedCode => emit('update:result', processResponse(formattedCode) ) )
|
||||
.then( formattedCode => processResponse(formattedCode) )
|
||||
}
|
||||
|
||||
function processResponse(formattedCode : any){
|
||||
emit('update:result', formattedCode )
|
||||
emit("update:error", formattedCode.status == "ERR")
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user