mirror of
https://github.com/versia-pub/server.git
synced 2025-12-08 01:08:19 +01:00
16 lines
427 B
TypeScript
16 lines
427 B
TypeScript
import type { MatchedRoute } from "bun";
|
|
import type { Config } from "config-manager";
|
|
import type { AuthData } from "~database/entities/User";
|
|
|
|
export type RouteHandler<T> = (
|
|
req: Request,
|
|
matchedRoute: MatchedRoute,
|
|
extraData: {
|
|
auth: AuthData;
|
|
parsedRequest: Partial<T>;
|
|
configManager: {
|
|
getConfig: () => Promise<Config>;
|
|
};
|
|
},
|
|
) => Response | Promise<Response>;
|