Minor tweaks
This commit is contained in:
parent
b33a301e44
commit
d279832c1a
|
@ -44,12 +44,12 @@ export default async function route(req: NextApiRequest, res: NextApiResponse) {
|
||||||
noStore: boolean
|
noStore: boolean
|
||||||
imagePrompt: {mime: string; content: Buffer} | null
|
imagePrompt: {mime: string; content: Buffer} | null
|
||||||
stepSchedule: {start?: number; end?: number}
|
stepSchedule: {start?: number; end?: number}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const { dreamResponse, images } = await generateAsync({
|
const { _dreamResponse, images } = await generateAsync({
|
||||||
...body,
|
...body,
|
||||||
// Don't actually write to disk, because we're going to upload it to Firestore
|
// Don't actually write to disk, because we're going to upload it to Firestore
|
||||||
noStore: true,
|
noStore: true,
|
||||||
|
@ -59,7 +59,7 @@ export default async function route(req: NextApiRequest, res: NextApiResponse) {
|
||||||
|
|
||||||
res.status(200).json({ url })
|
res.status(200).json({ url })
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
res.status(500).json({ message: `Error running code: ${e}` })
|
res.status(501).json({ message: `Error running code: ${e}` })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user