Skip to content

Commit 846b24a

Browse files
authored
refactor: return static github api path (#1064)
1 parent 4afcbbb commit 846b24a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/utils/constants.ts

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ export const Constants = {
1010
clientSecret: process.env.OAUTH_CLIENT_SECRET,
1111
},
1212

13+
GITHUB_API_BASE_URL: 'https://api.github.com',
14+
1315
REPO_SLUG: 'gitify-app/gitify',
1416

1517
// Storage

src/utils/helpers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function getGitHubAPIBaseUrl(hostname) {
3939
const isEnterprise = isEnterpriseHost(hostname);
4040
return isEnterprise
4141
? `https://${hostname}/api/v3`
42-
: `https://api.${hostname}`;
42+
: Constants.GITHUB_API_BASE_URL;
4343
}
4444

4545
export function addNotificationReferrerIdToUrl(

0 commit comments

Comments
 (0)