chore: update router to 0.0.5 (#69)

This commit is contained in:
Leo K
2021-10-21 22:58:09 +02:00
committed by GitHub
parent d1076b0ad1
commit f0b96b80c8
4 changed files with 7 additions and 9 deletions
+3 -3
View File
@@ -187,12 +187,12 @@ export class ServerContext {
(page.handler as Handler)({
req,
match,
render: createRender(req, match.params),
render: createRender(req, match),
});
} else {
for (const [method, handler] of Object.entries(page.handler)) {
routes[`${method}@${page.route}`] = (req, match) =>
handler({ req, match, render: createRender(req, match.params) });
handler({ req, match, render: createRender(req, match) });
}
}
}
@@ -225,7 +225,7 @@ export class ServerContext {
*/
#bundleAssetRoute = (): router.MatchHandler => {
return async (_req, match) => {
const path = `/${match.params.path}`;
const path = `/${match.path}`;
const file = await this.#bundler.get(path);
let res;
if (file) {