@@ -51,7 +51,7 @@ var response = {
5151}
5252
5353function responseError ( res , code , detail , msg ) {
54- res . status ( code ) . render ( config . errorPath , {
54+ res . status ( code ) . render ( 'error.ejs' , {
5555 url : config . serverURL ,
5656 title : code + ' ' + detail + ' ' + msg ,
5757 code : code ,
@@ -101,11 +101,11 @@ function showIndex (req, res, next) {
101101 } ) . then ( function ( user ) {
102102 if ( user ) {
103103 data . deleteToken = user . deleteToken
104- res . render ( config . indexPath , data )
104+ res . render ( 'index.ejs' , data )
105105 }
106106 } )
107107 } else {
108- res . render ( config . indexPath , data )
108+ res . render ( 'index.ejs' , data )
109109 }
110110}
111111
@@ -119,7 +119,7 @@ function responseCodiMD (res, note) {
119119 'Cache-Control' : 'private' , // only cache by client
120120 'X-Robots-Tag' : 'noindex, nofollow' // prevent crawling
121121 } )
122- res . render ( config . codimdPath , {
122+ res . render ( 'codimd.ejs' , {
123123 url : config . serverURL ,
124124 title : title ,
125125 useCDN : config . useCDN ,
@@ -275,7 +275,7 @@ function renderPublish (data, res) {
275275 res . set ( {
276276 'Cache-Control' : 'private' // only cache by client
277277 } )
278- res . render ( config . prettyPath , data )
278+ res . render ( 'pretty.ejs' , data )
279279}
280280
281281function actionPublish ( req , res , note ) {
@@ -657,7 +657,7 @@ function renderPublishSlide (data, res) {
657657 res . set ( {
658658 'Cache-Control' : 'private' // only cache by client
659659 } )
660- res . render ( config . slidePath , data )
660+ res . render ( 'slide.ejs' , data )
661661}
662662
663663module . exports = response
0 commit comments