Migrate the rest of the easy stuff
This commit is contained in:
@@ -17,11 +17,10 @@ export async function onRequestPost(context: RequestContext) {
|
||||
|
||||
await context.env.DATA.delete(`reportprocessing_${id}`);
|
||||
|
||||
const value = await context.env.D1.prepare(
|
||||
"SELECT id FROM reports WHERE id = ?;",
|
||||
)
|
||||
.bind(id)
|
||||
.first();
|
||||
const value = await context.data.prisma.report.findUnique({
|
||||
select: { id: true },
|
||||
where: { id },
|
||||
});
|
||||
|
||||
if (!value) return jsonError("Report is missing", 500);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user