fix json return things
parent
a388b6a025
commit
3b0d8380cb
|
@ -48,7 +48,9 @@ func Execute(w http.ResponseWriter, r *http.Request) (int, error) {
|
||||||
return 500, err
|
return 500, err
|
||||||
}
|
}
|
||||||
|
|
||||||
commands.Execute()
|
w.Header().Set("Content-Type", "application/json")
|
||||||
|
w.Write([]byte("{}"))
|
||||||
|
go commands.Execute()
|
||||||
} else {
|
} else {
|
||||||
content, err := ioutil.ReadFile("config." + language)
|
content, err := ioutil.ReadFile("config." + language)
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,11 @@ $(document).ready(function() {
|
||||||
url : url,
|
url : url,
|
||||||
data : data,
|
data : data,
|
||||||
dataType : 'json',
|
dataType : 'json',
|
||||||
encode : true
|
encode : true,
|
||||||
}).done(function(data) {
|
}).done(function(data) {
|
||||||
console.log(data);
|
alert("it workss");
|
||||||
|
}).fail(function(data) {
|
||||||
|
alert("it failed");
|
||||||
});
|
});
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
Loading…
Reference in New Issue