mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-10-01 15:48:23 -05:00
Move app to apps/web-react in pnpm workspace layout
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { runWithRequestContext } from "./request-context.server";
|
||||
|
||||
type MiddlewareArgs = {
|
||||
request: Request;
|
||||
url: URL;
|
||||
context: unknown;
|
||||
};
|
||||
|
||||
type MiddlewareFn = (
|
||||
args: MiddlewareArgs,
|
||||
next: () => Promise<Response>,
|
||||
) => Promise<Response>;
|
||||
|
||||
// TODO: this is only needed for our current hacky toast setup, once a proper one in place this middleware can be deleted
|
||||
export const requestContextMiddleware: MiddlewareFn = ({ url }, next) =>
|
||||
runWithRequestContext({ url }, () => next());
|
||||
Reference in New Issue
Block a user