Skip to content

Commit

Permalink
finish redirect if success returned 5x, via installer
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Sep 14, 2017
1 parent e64c1d2 commit b8ce402
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions public/src/installer/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,14 @@ $('document').ready(function () {
$('#launch .fa-spin').removeClass('hide');

$.post('/launch', function () {
var checker = setInterval(function () {
var successCount = 0;
setInterval(function () {
$.get('/admin').done(function () {
clearInterval(checker);
setTimeout(function () {
if (successCount >= 5) {
window.location = 'admin';
}, 2000);
} else {
successCount += 1;
}
});
}, 750);
});
Expand Down

0 comments on commit b8ce402

Please sign in to comment.