Bläddra i källkod

create not found page

itizawa 5 år sedan
förälder
incheckning
9b9eb61b2d

+ 1 - 1
src/server/routes/index.js

@@ -180,7 +180,7 @@ module.exports = function(crowi, app) {
   app.post('/_api/hackmd.discard'        , accessTokenParser , loginRequiredStrictly , csrf, hackmd.validateForApi, hackmd.discard);
   app.post('/_api/hackmd.saveOnHackmd'   , accessTokenParser , loginRequiredStrictly , csrf, hackmd.validateForApi, hackmd.saveOnHackmd);
 
-  app.get('/share/:linkId', page.showSharedPage, page.notFound);
+  app.get('/share/:linkId', page.showSharedPage);
 
   app.get('/*/$'                   , loginRequired , page.showPageWithEndOfSlash, page.notFound);
   app.get('/*'                     , loginRequired , page.showPage, page.notFound);

+ 1 - 2
src/server/routes/page.js

@@ -451,8 +451,7 @@ module.exports = function(crowi, app) {
 
     if (page == null) {
       // page is not found
-      // TODO GW-2735 create not found page
-      // return res.render(`layout-${layoutName}/not_found_shared_page`);
+      return res.render(`layout-${layoutName}/not_found_shared_page`);
     }
 
     const renderVars = {};

+ 0 - 0
src/server/views/layout-growi/not_found_shared_page.html


+ 0 - 0
src/server/views/layout-kibela/not_found_shared_page.html