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 78c6121b15
commit 34861701c9
10 changed files with 102 additions and 80 deletions
@@ -1,6 +1,7 @@
import { File } from "@/file"
import { Effect, Layer, Schema } from "effect"
import { HttpApi, HttpApiBuilder, HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
import { Authorization } from "./auth"
const FileQuery = Schema.Struct({
path: Schema.String,
@@ -51,7 +52,8 @@ export const FileApi = HttpApi.make("file")
title: "file",
description: "Experimental HttpApi file routes.",
}),
),
)
.middleware(Authorization),
)
.annotateMerge(
OpenApi.annotations({