move api to /api/*

This commit is contained in:
Bel LaPointe
2023-10-27 20:50:27 -06:00
parent 641ebf1c93
commit 4858286bd6
2 changed files with 8 additions and 7 deletions

View File

@@ -17,12 +17,12 @@
function callback(responseBody, responseStatus) {
}
function draw(form) {
path = "/bal"
path = "/api/bal"
query = "?x=y"
Array.from(form.elements).forEach((input) => {
query += "&" + input.name + "=" + input.value;
if (input.name == "mode") {
path = "/" + input.value;
path = "/api/" + input.value;
}
});
console.log(path, query);