updated as in the terminal and gate api's

This commit is contained in:
csawatzky 2025-04-17 15:42:19 -06:00
parent 76744c1b6f
commit 74c8ed661c
13 changed files with 109 additions and 75 deletions

View file

@ -181,14 +181,14 @@ export default function Terminals(props: Props) {
const load = useCallback(() => {
if(loading) return
setLoading(true)
terminalAPI.listTerminals(200, 0, "asc", "name").then(resp => {
terminalAPI.listTerminals(200, 0, "asc", "name", as).then(resp => {
setTerminals(resp.data.terminals.map(a => Terminal.any(a)));
}).catch(err => {
console.log("There was a problem loading Terminals")
}).finally(() => {
setLoading(false)
})
}, [terminalAPI, openSnack]); //eslint-disable-line react-hooks/exhaustive-deps
}, [terminalAPI, openSnack, as]); //eslint-disable-line react-hooks/exhaustive-deps
useEffect(() => {
load();
@ -197,7 +197,7 @@ export default function Terminals(props: Props) {
const remove = () => {
if (currentTerminal) {
terminalAPI
.removeTerminal(currentTerminal.key)
.removeTerminal(currentTerminal.key, as)
.then(resp => {
openSnack("Terminal Deleted");
let a = terminals;