feat: add ctx.renderNotFound() to explicitly render 404 template (#481)

Co-authored-by: Luca Casonato <hello@lcas.dev>
This commit is contained in:
Steven Yung
2022-08-09 19:23:17 +00:00
committed by GitHub
co-authored by Luca Casonato
parent b169d18ecb
commit 49092ed83a
6 changed files with 70 additions and 10 deletions
+1
View File
@@ -65,6 +65,7 @@ export interface HandlerContext<Data = unknown, State = Record<string, unknown>>
extends ConnInfo {
params: Record<string, string>;
render: (data?: Data) => Response | Promise<Response>;
renderNotFound: () => Response | Promise<Response>;
state: State;
}