Skip to content

Commit c7e3c9e

Browse files
committed
Updated service to allow for different usernames
1 parent e0de377 commit c7e3c9e

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/app/components/home/github.service.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ export default class GitHubService {
22
constructor ($resource) {
33
'ngInject';
44
var githubService = $resource(
5-
'https://api.github.com/users/',
5+
'https://api.github.com/users/%3Cspan%20class="x x-first x-last">:username/repos',
66
{},
77
{
88
'getRepos': {
99
method: 'GET',
10-
url: 'https://api.github.com/users/nearbycoder/repos',
1110
isArray: true
1211
}
1312
}

src/app/components/home/home.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export default class HomeController {
22
constructor (githubService) {
33
'ngInject';
44

5-
githubService.getRepos().$promise.then(results => {
5+
githubService.getRepos({username: 'nearbycoder'}).$promise.then(results => {
66
this.repos = results;
77
});
88
}

0 commit comments

Comments
 (0)