mirror of
https://github.com/harness/drone.git
synced 2025-05-08 03:32:44 +08:00
19 lines
442 B
JavaScript
19 lines
442 B
JavaScript
'use strict';
|
|
|
|
angular.module('app').controller("HomeController", function($scope, $http, user, websocket) {
|
|
|
|
$scope.user = user;
|
|
|
|
websocket.subscribeRepos(function(repos) {
|
|
console.log(repos);
|
|
});
|
|
|
|
$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);
|
|
});
|
|
});
|