Clean up the repository list API and loads stars with it
We load stars with the same list API now so that we get the extra metadata needed in the repo list (popularity and last modified)
This commit is contained in:
parent
bb269a56b6
commit
a0c4e72f13
7 changed files with 107 additions and 56 deletions
|
@ -80,7 +80,13 @@
|
|||
return;
|
||||
}
|
||||
|
||||
$scope.starred_repositories = ApiService.listStarredReposAsResource().get(function(resp) {
|
||||
var options = {
|
||||
'starred': true,
|
||||
'last_modified': true,
|
||||
'popularity': true
|
||||
};
|
||||
|
||||
$scope.starred_repositories = ApiService.listReposAsResource().withOptions(options).get(function(resp) {
|
||||
return resp.repositories.map(function(repo) {
|
||||
repo = findDuplicateRepo(repo);
|
||||
repo.is_starred = true;
|
||||
|
@ -96,8 +102,6 @@
|
|||
|
||||
$scope.namespaces.map(function(namespace) {
|
||||
var options = {
|
||||
'public': false,
|
||||
'sort': true,
|
||||
'namespace': namespace.name,
|
||||
'last_modified': true,
|
||||
'popularity': true
|
||||
|
|
Reference in a new issue