Update machine-api for modified api schema (#3572)

update to new machine-api format
This commit is contained in:
Paul Tagliamonte
2024-08-28 15:15:37 -04:00
committed by GitHub
parent 5e8227ead8
commit 1162ff3b03
7 changed files with 197 additions and 2880 deletions

View File

@ -52,7 +52,7 @@ const kittycad = (access: string, args: any) =>
// bite our butts.
const listMachines = async (): Promise<MachinesListing> => {
const machineApi = await ipcRenderer.invoke('find_machine_api')
if (!machineApi) return {}
if (!machineApi) return []
return fetch(`http://${machineApi}/machines`).then((resp) => resp.json())
}