Error response
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user