[fix] Redirect to login if postinstall has already been executed

This commit is contained in:
kload 2014-05-26 09:50:50 +00:00
parent d53f84c3d7
commit 350fac92cf

View file

@ -406,7 +406,13 @@ app = Sammy('#main', function (sam) {
sam.get('#/postinstall', function(c) { sam.get('#/postinstall', function(c) {
$('#masthead').hide(); $('#masthead').hide();
c.view('postinstall/postinstall_1'); c.checkInstall(function(isInstalled) {
if (isInstalled) {
c.redirect('#/login');
} else {
c.view('postinstall/postinstall_1');
}
});
}); });
sam.get('#/postinstall/domain', function(c) { sam.get('#/postinstall/domain', function(c) {