diff options
author | 2021-06-06 16:36:11 +0530 | |
---|---|---|
committer | 2021-06-06 16:38:32 +0530 | |
commit | fd1fcbb1c00960453ba5ffcba4b6d0ca88396a02 (patch) | |
tree | 2b649156143476761fd9afa1b6d4db5bbce7b5af /src/features | |
parent | Build Ferdi for freeBSD (diff) | |
download | ferdium-app-fd1fcbb1c00960453ba5ffcba4b6d0ca88396a02.tar.gz ferdium-app-fd1fcbb1c00960453ba5ffcba4b6d0ca88396a02.tar.zst ferdium-app-fd1fcbb1c00960453ba5ffcba4b6d0ca88396a02.zip |
Extracted common string into constant.
Diffstat (limited to 'src/features')
-rw-r--r-- | src/features/announcements/api.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/features/announcements/api.js b/src/features/announcements/api.js index 2c4d11d05..f34a62745 100644 --- a/src/features/announcements/api.js +++ b/src/features/announcements/api.js | |||
@@ -1,6 +1,7 @@ | |||
1 | import { app } from '@electron/remote'; | 1 | import { app } from '@electron/remote'; |
2 | import Request from '../../stores/lib/Request'; | 2 | import Request from '../../stores/lib/Request'; |
3 | import apiBase from '../../api/apiBase'; | 3 | import apiBase from '../../api/apiBase'; |
4 | import { GITHUB_FERDI_REPO_NAME, GITHUB_ORG_NAME } from '../../config'; | ||
4 | 5 | ||
5 | const debug = require('debug')('Ferdi:feature:announcements:api'); | 6 | const debug = require('debug')('Ferdi:feature:announcements:api'); |
6 | 7 | ||
@@ -11,7 +12,7 @@ export const announcementsApi = { | |||
11 | }, | 12 | }, |
12 | 13 | ||
13 | async getChangelog(version) { | 14 | async getChangelog(version) { |
14 | const url = `https://api.github.com/repos/getferdi/ferdi/releases/tags/v${version}`; | 15 | const url = `https://api.github.com/repos/${GITHUB_ORG_NAME}/${GITHUB_FERDI_REPO_NAME}/releases/tags/v${version}`; |
15 | debug(`fetching release changelog from Github url: ${url}`); | 16 | debug(`fetching release changelog from Github url: ${url}`); |
16 | const request = await window.fetch(url, { method: 'GET' }); | 17 | const request = await window.fetch(url, { method: 'GET' }); |
17 | if (!request.ok) return null; | 18 | if (!request.ok) return null; |