aboutsummaryrefslogtreecommitdiff
path: root/motto/public/script.js
diff options
context:
space:
mode:
authorMarvin Borner2020-09-18 18:08:52 +0200
committerMarvin Borner2020-09-18 18:08:52 +0200
commitdef13b9b23c7e58526631513d1b5d2f590b8df9f (patch)
tree3ff4c2a57a685532065ebd79033c6aba6c423166 /motto/public/script.js
parent2f1e758a1be57083bc96b876469f07c5cb419350 (diff)
parenta4bf262b12d61f3d0057cbf68d54f9aa18153912 (diff)
Merge ig
Diffstat (limited to 'motto/public/script.js')
-rw-r--r--motto/public/script.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/motto/public/script.js b/motto/public/script.js
index 112b023..7b27ce0 100644
--- a/motto/public/script.js
+++ b/motto/public/script.js
@@ -4,7 +4,7 @@ document.querySelector(".wrapper").style.opacity = 1;
function send(id, vote) {
var xhp = new XMLHttpRequest();
- xhp.open("POST", "/abi/api/vote");
+ xhp.open("POST", "/api/vote");
xhp.setRequestHeader("Content-type", "application/json");
xhp.onreadystatechange = () => {
if (xhp.readyState == 4 && xhp.status == 200) console.log(xhp.responseText);
@@ -16,7 +16,7 @@ function send(id, vote) {
function add(main, description) {
var xhp = new XMLHttpRequest();
- xhp.open("POST", "/abi/api/add");
+ xhp.open("POST", "/api/add");
xhp.setRequestHeader("Content-type", "application/json");
xhp.onreadystatechange = () => {
if (xhp.readyState == 4 && xhp.status == 200) console.log(xhp.responseText);
@@ -141,7 +141,7 @@ function createButtonListener(yay) {
}
var xhp = new XMLHttpRequest();
-xhp.open("GET", "/abi/api/list");
+xhp.open("GET", "/api/list");
xhp.onreadystatechange = () => {
if (xhp.readyState == 4 && xhp.status == 200) {
let list = JSON.parse(xhp.responseText);