fix(server): merge competing PluginMiddleware handlers together (#1545)

This commit is contained in:
Reed von Redwitz
2023-07-31 13:56:38 +00:00
committed by GitHub
parent 80fece0d3c
commit 21c72abecc
9 changed files with 149 additions and 24 deletions
@@ -1,8 +1,9 @@
import { MiddlewareHandlerContext } from "$fresh/server.ts";
import { PluginMiddlewareState } from "../../utils/route-plugin.ts";
export async function handler(
_req: Request,
ctx: MiddlewareHandlerContext<{ test: string }>,
ctx: MiddlewareHandlerContext<PluginMiddlewareState>,
) {
ctx.state.test = "look, i'm set from a plugin!";
const resp = await ctx.next();