From c7fb2e490eb650afcad821929054bf46b973748f Mon Sep 17 00:00:00 2001 From: iamBadgers Date: Mon, 20 Apr 2026 21:24:16 -0700 Subject: [PATCH] remove references to localhost from axios calls. --- src/CreateTable.vue | 2 +- src/TableEditor.vue | 4 ++-- src/TableManager.vue | 15 ++++++++------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/CreateTable.vue b/src/CreateTable.vue index 513c4e0..5ca487a 100644 --- a/src/CreateTable.vue +++ b/src/CreateTable.vue @@ -17,7 +17,7 @@ const availableVersion = ref([ ]); function saveTable() { - axios.post('http://localhost/api/tables', { "table_name": table_name.value, "table_link": table_link.value, "version": version.value }).then(() => router.push({ name: "home" })) + axios.post('/api/tables', { "table_name": table_name.value, "table_link": table_link.value, "version": version.value }).then(() => router.push({ name: "home" })) } diff --git a/src/TableEditor.vue b/src/TableEditor.vue index cec9b32..78f2cc0 100644 --- a/src/TableEditor.vue +++ b/src/TableEditor.vue @@ -76,7 +76,7 @@ onMounted(() => { if (Number(route.params.id) == 0) { } else { - axios.get(`http://localhost/api/tables/${route.params.id}`).then((resp) => { + axios.get(`/api/tables/${route.params.id}`).then((resp) => { table.table_name = resp.data.table_name table.table_link = resp.data.table_link table.active = resp.data.active @@ -90,7 +90,7 @@ watch( () => route.params.id, (newValue, oldValue) => { console.log(newValue) - axios.get(`http://localhost/api/table/${newValue}`).then((resp) => { + axios.get(`/api/table/${newValue}`).then((resp) => { table.table_name = resp.data.table_name table.table_link = resp.data.table_link table.active = resp.data.active diff --git a/src/TableManager.vue b/src/TableManager.vue index 9f80ee4..d41c6f0 100644 --- a/src/TableManager.vue +++ b/src/TableManager.vue @@ -22,25 +22,25 @@ onMounted(() => { }) async function loadTables(): Promise { - return axios.get('http://localhost/api/tables/all') + return axios.get('/api/tables/all') .then((resp) => (allTables.value = resp.data)) - .then(() => axios.get('http://localhost/api/tables/active')) + .then(() => axios.get('/api/tables/active')) .then((resp) => (activeTables.value = resp.data)) } function startTable(tableId: number) { - axios.post(`http://localhost/api/tables/${tableId}:start`) + axios.post(`/api/tables/${tableId}:start`, { "hard": "False" }) .then(() => loadTables()) } function stopTable(tableId: number) { - axios.post(`http://localhost/api/tables/${tableId}:stop`) + axios.post(`/api/tables/${tableId}:stop`) .then(() => loadTables()) } function deleteTable(tableId: number) { axios - .delete(`http://localhost/api/tables/${tableId}`) + .delete(`/api/tables/${tableId}`) .then(() => loadTables()) } @@ -53,9 +53,10 @@ function buildButtonModel(table: any) { }, }, { label: 'Restart' }, - { label: 'Hard Start', + { + label: 'Hard Start', command: () => { - axios.post(`http://localhost/api/tables/${table.id}:start`, {"hard": "True"}).then(() => loadTables()) + axios.post(`/api/tables/${table.id}:start`, { "hard": "True" }).then(() => loadTables()) } }, { separator: true },