From f44f1950dc67feb23401db06e6da2d7730c7b9e3 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Sat, 25 Sep 2021 11:01:11 +0200 Subject: [PATCH] fix: use new API route style in `fresh init` (#54) --- src/cli/init.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/init.ts b/src/cli/init.ts index f336a99d..0d260917 100644 --- a/src/cli/init.ts +++ b/src/cli/init.ts @@ -128,7 +128,7 @@ const JOKES = [ "An SEO expert walked into a bar, pub, inn, tavern, hostelry, public house.", ]; -export default (_req: Request): Response => { +export const handler = (_req: Request): Response => { const randomIndex = Math.floor(Math.random() * 10); const body = JOKES[randomIndex]; return new Response(body);