File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export class APIService {
34
34
query :
35
35
'query GetUserDetails($username: String!) { user(login: $username)' +
36
36
'{ name login followers { totalCount } repositories(first: 100, orderBy: {field: STARGAZERS, direction: DESC})' +
37
- '{ nodes { name owner { login } isPrivate stargazerCount } } } } } ' ,
37
+ '{ nodes { name owner { login } isPrivate stargazerCount } } } }' ,
38
38
variables : {
39
39
username : username
40
40
}
@@ -45,7 +45,10 @@ export class APIService {
45
45
}
46
46
) ;
47
47
48
- if ( response . status !== 200 ) return null ;
48
+ if ( response . status !== 200 ) {
49
+ console . error ( response . data ) ;
50
+ return null ;
51
+ }
49
52
const data : GithubRepos = response . data ;
50
53
51
54
data . total_stars = data ?. data ?. user ?. repositories ?. nodes ?. reduce (
You can’t perform that action at this time.
0 commit comments