From 2f6305bf8d305e639d5b1ae2cd6960226d8676a2 Mon Sep 17 00:00:00 2001 From: "Brian H. Buchholz" <4773480+bhb603@users.noreply.github.com> Date: Thu, 21 Nov 2024 20:52:02 -0500 Subject: [PATCH] cleanup docs/index handler --- www/routes/docs/index.tsx | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/www/routes/docs/index.tsx b/www/routes/docs/index.tsx index 503425c5b2d..ac680a79918 100644 --- a/www/routes/docs/index.tsx +++ b/www/routes/docs/index.tsx @@ -1,19 +1,10 @@ -import type { Handlers } from "fresh/compat"; - -export const handler: Handlers = { - GET(ctx) { - const slug = ctx.params.slug; - - if (slug === "concepts/architechture") { - return new Response("", { - status: 307, - headers: { location: "/docs/concepts/architecture" }, - }); - } +import { define } from "../../utils/state.ts"; +export const handler = define.handlers({ + GET(_ctx) { return new Response("", { status: 307, headers: { location: "/docs/introduction" }, }); }, -}; +});