mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-19 16:31:01 +00:00
Fix fetch commits in repo page
This commit is contained in:
parent
65b3129797
commit
d1f8486862
2 changed files with 4 additions and 4 deletions
|
@ -23,8 +23,8 @@ angular.module('app').controller("RepoController", function($scope, $http, $rout
|
||||||
|
|
||||||
|
|
||||||
// load the repo commit feed
|
// load the repo commit feed
|
||||||
repos.feed(repo.host, repo.owner, repo.name).success(function (feed) {
|
repos.commits(repo.host, repo.owner, repo.name).success(function (commits) {
|
||||||
$scope.commits = (typeof feed==='string')?[]:feed;
|
$scope.commits = (typeof commits==='string')?[]:commits;
|
||||||
$scope.state = 1;
|
$scope.state = 1;
|
||||||
})
|
})
|
||||||
.error(function (error) {
|
.error(function (error) {
|
||||||
|
|
|
@ -20,8 +20,8 @@ angular.module('app').service('repos', ['$q', '$http', function($q, $http) {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Gets a repository by host, owner and name.
|
// Gets a repository by host, owner and name.
|
||||||
this.feed = function(host, owner, name) {
|
this.commits = function(host, owner, name) {
|
||||||
return $http.get('/api/repos/'+host+'/'+owner+'/'+name+'/feed');
|
return $http.get('/api/repos/'+host+'/'+owner+'/'+name+'/commits');
|
||||||
};
|
};
|
||||||
|
|
||||||
// Updates an existing repository
|
// Updates an existing repository
|
||||||
|
|
Loading…
Reference in a new issue