Error response

This commit is contained in:
Your Name
2023-03-15 19:45:52 -04:00
parent 9e6397f038
commit da3aad8713

View File

@@ -1,7 +1,7 @@
export async function onRequest(context) { export async function onRequest(context) {
console.log(context); console.log(context);
if (context.params.dump !== context.env.DUMP_KEY) { if (context.params.dump !== context.env.DUMP_KEY) {
return new Response(); return new Response("Wrong key");
} }
const db = context.env.D1DB; const db = context.env.D1DB;
const dump = await db.dump(); const dump = await db.dump();