Skip to content

Commit

Permalink
chore: use tokens 2 and 3 for fetches the stats and data user (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
FajarKim authored Jan 6, 2024
1 parent e06891c commit bd156c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/fetcher/repositoryStats.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from "axios";
import getToken from "../getToken";
import { getToken3 } from "../getToken";

/**
* Type representing the data associated with a user's repository stats.
Expand Down Expand Up @@ -68,7 +68,7 @@ async function getPerPageRepositoryData(
url: `https://api.github.com/users/${sanitizedUsername}/repos?page=${pageno}&per_page=100`,
headers: {
"User-Agent": "FajarKim/github-readme-profile",
Authorization: getToken(true),
Authorization: getToken3(true),
},
});

Expand Down
6 changes: 3 additions & 3 deletions src/fetcher/stats.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from "axios";
import getToken from "../getToken";
import { getToken, getToken2, getToken3 } from "../getToken";

/**
* Represents a user's information and statistics.
Expand Down Expand Up @@ -167,7 +167,7 @@ async function getUserJoinYear(username: string): Promise<number> {
url: "https://api.github.com/graphql",
headers: {
"User-Agent": "FajarKim/github-readme-profile",
Authorization: getToken(true),
Authorization: getToken3(true),
},
data: {
query: `query userInfo($username: String!) {
Expand Down Expand Up @@ -210,7 +210,7 @@ async function fetchContributions(username: string, year: number): Promise<Contr
url: "https://api.github.com/graphql",
headers: {
"User-Agent": "FajarKim/github-readme-profile",
Authorization: getToken(true),
Authorization: getToken2(true),
},
data: {
query: `query userInfo($username: String!, $from: DateTime!, $to: DateTime!) {
Expand Down

0 comments on commit bd156c2

Please sign in to comment.