KV to D1 migration (this is totally gonna break something)
This commit is contained in:
@ -17,7 +17,11 @@ export async function onRequestPost(context: RequestContext) {
|
||||
|
||||
await context.env.DATA.delete(`reportprocessing_${id}`);
|
||||
|
||||
const value = await context.env.DATA.get(`report_${id}`);
|
||||
const value = await context.env.D1.prepare(
|
||||
"SELECT id FROM reports WHERE id = ?;",
|
||||
)
|
||||
.bind(id)
|
||||
.first();
|
||||
|
||||
if (!value) return jsonError("Report is missing", 500);
|
||||
|
||||
|
Reference in New Issue
Block a user