Merge pull request #505 from Bugagazavr/exp-fix_commits_page

Fix blank repo page
This commit is contained in:
Brad Rydzewski 2014-10-02 08:33:51 -07:00
commit 894516b6f2
2 changed files with 4 additions and 4 deletions

View file

@ -23,8 +23,8 @@ angular.module('app').controller("RepoController", function($scope, $http, $rout
// load the repo commit feed
repos.feed(repo.host, repo.owner, repo.name).success(function (feed) {
$scope.commits = (typeof feed==='string')?[]:feed;
repos.commits(repo.host, repo.owner, repo.name).success(function (commits) {
$scope.commits = (typeof commits==='string')?[]:commits;
$scope.state = 1;
})
.error(function (error) {

View file

@ -20,8 +20,8 @@ angular.module('app').service('repos', ['$q', '$http', function($q, $http) {
};
// Gets a repository by host, owner and name.
this.feed = function(host, owner, name) {
return $http.get('/api/repos/'+host+'/'+owner+'/'+name+'/feed');
this.commits = function(host, owner, name) {
return $http.get('/api/repos/'+host+'/'+owner+'/'+name+'/commits');
};
// Updates an existing repository