2024-04-23 01:53:37 -04:00
|
|
|
const success = new Response('Success', { status: 200 });
|
|
|
|
const notFound = new Response('Not Found', { status: 404 });
|
|
|
|
const methodNotAllowed = new Response('Method Not Allowed', { status: 405 });
|
|
|
|
|
|
|
|
export interface Env {
|
|
|
|
DB: D1Database;
|
|
|
|
R2: R2Bucket;
|
|
|
|
}
|
2024-04-22 00:30:50 -04:00
|
|
|
|
|
|
|
export default {
|
2024-04-23 01:53:37 -04:00
|
|
|
async fetch(
|
|
|
|
request: Request,
|
|
|
|
env: Env,
|
|
|
|
ctx: ExecutionContext // : Promise<Response>
|
|
|
|
) {
|
|
|
|
const url = new URL(request.url);
|
|
|
|
const path = url.pathname;
|
|
|
|
const method = request.method;
|
|
|
|
if (method === 'GET') {
|
|
|
|
}
|
2024-04-22 00:30:50 -04:00
|
|
|
},
|
|
|
|
};
|