Skip to content

Commit

Permalink
refactor: return static github api path (#1064)
Browse files Browse the repository at this point in the history
  • Loading branch information
setchy authored Apr 29, 2024
1 parent 4afcbbb commit 846b24a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export const Constants = {
clientSecret: process.env.OAUTH_CLIENT_SECRET,
},

GITHUB_API_BASE_URL: 'https://api.github.com',

REPO_SLUG: 'gitify-app/gitify',

// Storage
Expand Down
2 changes: 1 addition & 1 deletion src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function getGitHubAPIBaseUrl(hostname) {
const isEnterprise = isEnterpriseHost(hostname);
return isEnterprise
? `https://${hostname}/api/v3`
: `https://api.${hostname}`;
: Constants.GITHUB_API_BASE_URL;
}

export function addNotificationReferrerIdToUrl(
Expand Down

0 comments on commit 846b24a

Please sign in to comment.