fix: change MultiHandler back to Handlers (#1396)

This commit is contained in:
Marvin Hagemeister
2023-07-03 09:57:46 +02:00
committed by GitHub
parent eb53d53ab8
commit 16be99e69b
32 changed files with 135 additions and 66 deletions
+5
View File
@@ -192,6 +192,11 @@ export class ServerContext {
pattern = String(config.routeOverride);
}
let { handler } = module as RouteModule;
if (!handler && "handlers" in module) {
throw new Error(
`Found named export "handlers" in ${self} instead of "handler". Did you mean "handler"?`,
);
}
handler ??= {};
if (
component && typeof handler === "object" && handler.GET === undefined