feat: add some login

This commit is contained in:
max_richter 2023-11-23 12:54:36 +01:00
parent 84987129e6
commit eaab1bfc8d

View File

@ -38,11 +38,14 @@ export async function generateImage(prompt: string, negativePrompt: string) {
} }
); );
if (!response.ok) { if (!response.ok) {
throw new Error(`Non-200 response: ${await response.text()}`) throw new Error(`Non-200 response: ${await response.text()}`)
} }
const responseJSON = await response.json(); const responseJSON = await response.json();
console.log({ responseJSON })
return responseJSON.artifacts[0]; return responseJSON.artifacts[0];
} }