Files
sweet/tests/fixture_plugin/utils/sample_routes/_middleware.ts
T
2023-07-13 11:26:07 +02:00

8 lines
241 B
TypeScript

import { MiddlewareHandlerContext } from "$fresh/server.ts";
export async function handler(_req: Request, ctx: MiddlewareHandlerContext) {
ctx.state.test = "look, i'm set from a plugin!";
const resp = await ctx.next();
return resp;
}