Skip to content

Commit

Permalink
Remove boilerplate
Browse files Browse the repository at this point in the history
Refs #1834
  • Loading branch information
thewilkybarkid committed Dec 13, 2024
1 parent 7da0af5 commit 925b10d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 1 addition & 5 deletions src/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ export interface Route<A extends { readonly [K in keyof A]: unknown }> {
schema: Schema.Schema<A, { readonly [K in keyof A]: string }>
}

export const AboutUs: Route<object> = {
path: '/about',
href: () => '/about',
schema: Schema.Struct({}),
}
export const AboutUs = '/about'

export const WriteComment: Route<{ id: number }> = {
path: '/reviews/:id/write-a-comment',
Expand Down

0 comments on commit 925b10d

Please sign in to comment.