mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-15 14:34:26 +00:00
19 lines
439 B
JavaScript
19 lines
439 B
JavaScript
'use strict';
|
|
|
|
angular.module('app').controller("HomeController", function($scope, $http, feed, notify) {
|
|
|
|
feed.subscribe(function(item) {
|
|
notify.sendCommit(
|
|
item.repo,
|
|
item.commit
|
|
);
|
|
});
|
|
|
|
$http({method: 'GET', url: '/v1/user/feed'}).
|
|
success(function(data, status, headers, config) {
|
|
$scope.feed = (typeof data==='string')?[]:data;
|
|
}).
|
|
error(function(data, status, headers, config) {
|
|
console.log(data);
|
|
});
|
|
});
|