Improve posting data

This commit is contained in:
Tobias Wasner 2023-01-16 23:29:58 +01:00
parent 2e2ab786ec
commit 4d326a0d83

View File

@ -30,12 +30,17 @@
ai: false
});
jQuery.post("https://" + window.location.hostname + "/api/chat", {
history: history,
token: token
}).done(function (data: any) {
history = data;
msg = "";
jQuery.ajax("https://" + window.location.hostname + "/api/chat", {
data : JSON.stringify({
history: history,
token: token
}),
contentType : 'application/json',
type : 'POST',
success: function(data: any) {
history = data;
msg = "";
}
});
}
function keyUp (e: { key: string; keyCode: number; }) {