1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-01-05 10:20:36 +02:00
woodpecker/server/app/scripts/controllers/sync.js

17 lines
506 B
JavaScript
Raw Normal View History

2014-07-10 08:24:06 +03:00
'use strict';
angular.module('app').controller("SyncController", function($scope, $http, $interval, $location, $routeParams, users) {
var return_to = $routeParams.return_to
var stop = $interval(function() {
2014-07-14 06:24:03 +03:00
// todo(bradrydzewski) We should poll the user to see if the
// sync process is complete, using the user.syncing variable.
$interval.cancel(stop);
if (return_to != undefined) {
$location.$$search = {}
$location.path(return_to);
} else {
$location.path("/");
}
2014-07-10 08:24:06 +03:00
}, 5000);
});