Imagefilethings

This commit is contained in:
space-nuko
2023-05-13 22:13:06 -05:00
parent 05bcce5573
commit 152a1c6097
14 changed files with 169 additions and 272 deletions

View File

@@ -258,9 +258,13 @@ export default class ComfyAPI {
},
body: postBody
})
.then(res => res.json())
.then(async (res) => {
if (res.status != 200) {
throw await res.text()
}
return res.json()
})
.then(raw => { return { promptID: raw.prompt_id } })
.catch(res => { throw res.text() })
.catch(error => { return { error } })
}