incorrect api usage

This commit is contained in:
Paul Liverman III 2018-04-23 06:17:10 -07:00
parent c30a6b7224
commit 366f130fc0

View File

@ -6,7 +6,7 @@ function request(url) {
} }
function check(id) { function check(id) {
var checkbox = document.getElementById("task-"+id); var checkbox = document.getElementById("task-" + id);
if (checkbox.checked) { if (checkbox.checked) {
var xhr = request("/v1/do"); var xhr = request("/v1/do");
xhr.onreadystatechange = function() { xhr.onreadystatechange = function() {
@ -38,7 +38,7 @@ function new_task() {
console.log(xhr.responseText); console.log(xhr.responseText);
} }
} }
xhr.send(JSON.stringify({api_key: API_KEY, text: text.value})); xhr.send(JSON.stringify({api_key: API_KEY, content: text.value}));
return false; // prevent form submission return false; // prevent form submission
} }