From 925b10d342c00b8013959a90334392cadd63c687 Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Fri, 13 Dec 2024 14:39:24 +0000 Subject: [PATCH] Remove boilerplate Refs #1834 --- src/Router.ts | 2 +- src/routes.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Router.ts b/src/Router.ts index 3f7813cc7..99e407bd9 100644 --- a/src/Router.ts +++ b/src/Router.ts @@ -210,7 +210,7 @@ const WriteCommentFlowRouter = pipe( export const Router = pipe( HttpRouter.empty, - HttpRouter.get(Routes.AboutUs.path, pipe(AboutUsPage, Effect.andThen(toHttpServerResponse))), + HttpRouter.get(Routes.AboutUs, pipe(AboutUsPage, Effect.andThen(toHttpServerResponse))), HttpRouter.concat(WriteCommentFlowRouter), HttpRouter.use( HttpMiddleware.make( diff --git a/src/routes.ts b/src/routes.ts index 69ffdefce..16d609ad1 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -25,11 +25,7 @@ export interface Route { schema: Schema.Schema } -export const AboutUs: Route = { - path: '/about', - href: () => '/about', - schema: Schema.Struct({}), -} +export const AboutUs = '/about' export const WriteComment: Route<{ id: number }> = { path: '/reviews/:id/write-a-comment',