General refactor

This commit is contained in:
2025-06-09 08:53:29 +02:00
parent 1e5cd0790b
commit 0c76b852eb
14 changed files with 38 additions and 64 deletions
+4 -4
View File
@@ -26,7 +26,7 @@ setEventListeners(upload, async () => {
const formData = new FormData();
formData.append('file', file);
fetch('/app/upload', {
fetch(`${app_url}/upload`, {
method: 'POST',
body: formData
}).then((response) => {
@@ -43,11 +43,11 @@ setEventListeners(upload, async () => {
});
setEventListeners(add, () => {
window.location.href = "/app/add";
window.location.href = `${app_url}/add`;
});
setEventListeners(download, () => {
window.location.href = "/app/download";
window.location.href = `${app_url}/download`;
});
setEventListeners(logout, () => {
@@ -58,6 +58,6 @@ const sql_rows = sql_table.rows;
for (let i = 1; i < sql_rows.length; i++) {
setEventListeners(sql_rows[i], () => {
window.location.href = `/app/edit?element=${sql_rows[i].cells[0].innerText}`;
window.location.href = `${app_url}/edit?element=${sql_rows[i].cells[0].innerText}`;
});
}