File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ const GRAPHQL_STATS_QUERY = `
70
70
*
71
71
* @param {import('axios').AxiosRequestHeaders } variables Fetcher variables.
72
72
* @param {string } token GitHub token.
73
- * @returns {Promise<Object > } Stats fetcher response.
73
+ * @returns {Promise<import('../common/types').Fetcher > } Stats fetcher response.
74
74
*/
75
75
const fetcher = ( variables , token ) => {
76
76
const query = ! variables . after ? GRAPHQL_STATS_QUERY : GRAPHQL_REPOS_QUERY ;
@@ -89,7 +89,7 @@ const fetcher = (variables, token) => {
89
89
* Fetch stats information for a given username.
90
90
*
91
91
* @param {string } username Github username.
92
- * @returns {Promise<Object > } GraphQL Stats object.
92
+ * @returns {Promise<import('../common/types').StatsFetcher > } GraphQL Stats object.
93
93
*
94
94
* @description This function supports multi-page fetching if the 'FETCH_MULTI_PAGE_STARS' environment variable is set to true.
95
95
*/
@@ -256,7 +256,7 @@ const fetchStats = async (
256
256
return prev + curr . stargazers . totalCount ;
257
257
} , 0 ) ;
258
258
259
- // @ts -ignore
259
+ // @ts -ignore // TODO: Fix this.
260
260
stats . rank = calculateRank ( {
261
261
totalCommits : stats . totalCommits ,
262
262
totalRepos : user . repositories . totalCount ,
Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ describe("Test /api/", () => {
275
275
text_color : "fff" ,
276
276
bg_color : "fff" ,
277
277
} ,
278
- data ,
278
+ data_stats ,
279
279
) ;
280
280
281
281
await api ( req , res ) ;
You can’t perform that action at this time.
0 commit comments