feat: add some login
This commit is contained in:
parent
84987129e6
commit
eaab1bfc8d
@ -38,11 +38,14 @@ export async function generateImage(prompt: string, negativePrompt: string) {
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`Non-200 response: ${await response.text()}`)
|
||||
}
|
||||
|
||||
const responseJSON = await response.json();
|
||||
|
||||
console.log({ responseJSON })
|
||||
|
||||
return responseJSON.artifacts[0];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user