Esteves Enzo
store own generation in storage by id
cca515d
raw
history blame
383 Bytes
import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()
export async function POST(request: Request) {
const { ids } = await request.json()
const images = await prisma.image.findMany({
orderBy: {
id: 'desc'
},
where: {
id: {
in: ids,
}
}
})
return Response.json({ images, status: 200, statusText: "OK" })
}