Sotaro KARASAWA пре 11 година
родитељ
комит
1cef6790b0
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      lib/middlewares.js

+ 3 - 2
lib/middlewares.js

@@ -106,7 +106,7 @@ exports.applicationNotInstalled = function() {
   return function(req, res, next) {
     var config = req.config;
 
-    if (Object.keys(config.crowi).length !== 0) {
+    if (Object.keys(config.crowi).length !== 1) {
       return res.render('500', { error: 'Application already installed.' });
     }
 
@@ -117,8 +117,9 @@ exports.applicationNotInstalled = function() {
 exports.applicationInstalled = function() {
   return function(req, res, next) {
     var config = req.config;
+    console.log(config);
 
-    if (Object.keys(config.crowi).length === 0) {
+    if (Object.keys(config.crowi).length === 1) { // app:url is set by process
       return res.redirect('/installer');
     }