1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-06-06 21:46:26 +02:00

25 lines
642 B
JavaScript
Raw Normal View History

'use strict';
angular.module('app').controller("HomeController", function($scope, $http, feed) {
feed.subscribe(function(item) {
// todo toast notification
});
$http({method: 'GET', url: '/v1/user/feed'}).
success(function(data, status, headers, config) {
2014-07-09 22:24:06 -07:00
$scope.feed = (typeof data==='string')?[]:data;
2014-07-09 00:46:15 -07:00
}).
error(function(data, status, headers, config) {
console.log(data);
});
$http({method: 'GET', url: '/v1/user/repos'}).
success(function(data, status, headers, config) {
$scope.repos = (typeof data==='string')?[]:data;
}).
error(function(data, status, headers, config) {
console.log(data);
});
});