Refactor HttpApi auth middleware wiring (#24168)

This commit is contained in:
Kit Langton
2026-04-24 17:11:07 -04:00
committed by GitHub
parent 0405bc74e9
commit 435becbea0
10 changed files with 102 additions and 80 deletions
@@ -2,6 +2,7 @@ import { Config } from "@/config"
import { Provider } from "@/provider"
import { Effect, Layer } from "effect"
import { HttpApi, HttpApiBuilder, HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
import { Authorization } from "./auth"
const root = "/config"
@@ -33,7 +34,8 @@ export const ConfigApi = HttpApi.make("config")
title: "config",
description: "Experimental HttpApi config routes.",
}),
),
)
.middleware(Authorization),
)
.annotateMerge(
OpenApi.annotations({