From d1f8486862ee004205278c6946560fc616a6400a Mon Sep 17 00:00:00 2001 From: Kirill Zaitsev Date: Thu, 2 Oct 2014 18:11:13 +0400 Subject: [PATCH] Fix fetch commits in repo page --- server/app/scripts/controllers/repo.js | 4 ++-- server/app/scripts/services/repo.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/app/scripts/controllers/repo.js b/server/app/scripts/controllers/repo.js index 34d16298a..2c1892f85 100644 --- a/server/app/scripts/controllers/repo.js +++ b/server/app/scripts/controllers/repo.js @@ -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) { diff --git a/server/app/scripts/services/repo.js b/server/app/scripts/services/repo.js index 3f842067a..ab7f2385e 100644 --- a/server/app/scripts/services/repo.js +++ b/server/app/scripts/services/repo.js @@ -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