mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-18 14:36:30 +00:00
24 lines
642 B
JavaScript
24 lines
642 B
JavaScript
'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) {
|
|
$scope.feed = (typeof data==='string')?[]:data;
|
|
}).
|
|
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);
|
|
});
|
|
});
|