//
//   Copyright 2009-2014 Ilkka Oksanen <iao@iki.fi>
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing,
//   software distributed under the License is distributed on an "AS
//   IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
//   express or implied.  See the License for the specific language
//   governing permissions and limitations under the License.
//

'use strict';

const authOptions = require('../../lib/authOptions');

module.exports = function*() {
    if (this.mas.userId !== null) {
        this.redirect('/app');
    } else {
        yield this.render('index', {
            page: 'frontpage',
            title: '',
            auth: authOptions
        });
    }
};

@@ -724,24 +724,115 @@
 nction*() %7B%0A
+    const path = this.request.path;%0A%0A    if (path === '/' %7C%7C path === '/index.html') %7B%0A    
     if (this
@@ -844,23 +844,16 @@
 user
-Id !== null
 ) %7B%0A
+    
     
@@ -879,16 +879,20 @@
 /app');%0A
+    
     %7D el
@@ -904,16 +904,20 @@
         
+    
 yield th
@@ -949,16 +949,20 @@
         
+    
 page: 'f
@@ -988,16 +988,20 @@
     
+  
+  
 title: '
 ',%0A 
@@ -996,19 +996,35 @@
 title: '
-',%0A
+Chat Service',%0A    
         
@@ -1045,16 +1045,195 @@
 Options%0A
+            %7D);%0A        %7D%0A    %7D else %7B%0A        const page = path.replace(/%5C/(.*)%5C.html/, '$1');%0A%0A        yield this.render(page, %7B%0A            page: page,%0A            title: page%0A
         

Fix pages controller