remove references to localhost from axios calls.

This commit is contained in:
iamBadgers
2026-04-20 21:24:16 -07:00
parent 8be9516dfd
commit c7fb2e490e
3 changed files with 11 additions and 10 deletions

View File

@@ -22,25 +22,25 @@ onMounted(() => {
})
async function loadTables(): Promise<void> {
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 },