KV to D1 migration (this is totally gonna break something)

This commit is contained in:
2024-05-12 01:25:46 -04:00
parent a2b3391bda
commit e00b7e8c55
24 changed files with 1835 additions and 669 deletions

View File

@ -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);