Skip to content

Commit

Permalink
fix: githubApiToken not equal lead to bad credentials vesoft-inc#70
Browse files Browse the repository at this point in the history
  • Loading branch information
alwqx committed Apr 29, 2024
1 parent 2a29cb8 commit 2e9df49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/GithubStatistics.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class GithubStatistics extends React.Component {
/* eslint-disable-next-line */
var t = btoa(GITHUB_API_TOKEN)
/* eslint-disable-next-line */
this.fetcher = new GithubFetcher(btoa(t))
this.fetcher = new GithubFetcher(t)
this.props.updateState("githubApiToken", t)

this.search = _.debounce(
Expand Down
3 changes: 1 addition & 2 deletions src/reducers/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ const INITIAL_STATE = {
releaseData: [],
releaseStats: {},

githubApiToken: 'Z2hwX29XQWdNS3gxeXNHRXBlTzV6OEdpdWZvNjc0WkhWZTN0bVlJVQ==',

githubApiToken: btoa(process.env.REACT_APP_GITHUB_API_TOKEN),
}

const github = (state = INITIAL_STATE, action) => {
Expand Down

0 comments on commit 2e9df49

Please sign in to comment.