remove references to localhost from axios calls.
This commit is contained in:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user