File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ declare module "https://deno.land/x/oak@v10.5.1/mod.ts" {
2525
2626 // add viewConfig to Application interface
2727 interface Application {
28- viewConcig : ViewConfig ;
28+ viewConfig : ViewConfig ;
2929 }
3030}
3131
@@ -36,24 +36,24 @@ export const oakAdapter: Adapter = (
3636) => {
3737 return async function ( ctx : Context , next : Function ) {
3838 // load default view setting
39- if ( ! ctx . app . viewConcig ) {
40- ctx . app . viewConcig = {
39+ if ( ! ctx . app . viewConfig ) {
40+ ctx . app . viewConfig = {
4141 viewEngine : config . viewEngine ,
4242 viewRoot : config . viewRoot ?? "./" ,
4343 } ;
4444 }
4545
4646 ctx . render = async ( fileName : string , data ?: object ) => {
4747 try {
48- const viewConfig = ctx . app . viewConcig ;
48+ const viewConfig = ctx . app . viewConfig ;
4949
5050 ctx . response . headers . set ( "Content-Type" , "text/html; charset=utf-8" ) ;
5151
5252 ctx . response . body = async ( ) => {
5353 return renderEngine (
5454 await getTemplate ( viewConfig . viewRoot ?? "./" , fileName ) ,
5555 data ?? { } ,
56- ctx . app . viewConcig ,
56+ ctx . app . viewConfig ,
5757 fileName
5858 ) ;
5959 }
You can’t perform that action at this time.
0 commit comments