BREAKING refactor: detach request from handler context (#114)

This commit is contained in:
Leo Kettmeir
2022-03-06 18:25:50 +01:00
committed by GitHub
parent 4556d2116d
commit cf48eafa9a
8 changed files with 45 additions and 33 deletions
+1 -1
View File
@@ -148,7 +148,7 @@ const JOKES = [
"An SEO expert walked into a bar, pub, inn, tavern, hostelry, public house.",
];
export const handler = (_ctx: HandlerContext): Response => {
export const handler = (_req: Request, _ctx: HandlerContext): Response => {
const randomIndex = Math.floor(Math.random() * 10);
const body = JOKES[randomIndex];
return new Response(body);