diff options
author | 2019-10-31 14:04:34 +0700 | |
---|---|---|
committer | 2019-10-31 14:04:34 +0700 | |
commit | d0afab6bde6bdc1b1e2ed98b230c5838ce65ea5c (patch) | |
tree | fae0c9890d96a013a87a83aab38b8a6e5ef83448 /src/api | |
parent | Merge pull request #176 from getferdi/l10n_develop (diff) | |
download | ferdium-app-d0afab6bde6bdc1b1e2ed98b230c5838ce65ea5c.tar.gz ferdium-app-d0afab6bde6bdc1b1e2ed98b230c5838ce65ea5c.tar.zst ferdium-app-d0afab6bde6bdc1b1e2ed98b230c5838ce65ea5c.zip |
#178 Fetch in-app news from Ferdi server only
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/server/ServerApi.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/server/ServerApi.js b/src/api/server/ServerApi.js index 164bc237b..627425948 100644 --- a/src/api/server/ServerApi.js +++ b/src/api/server/ServerApi.js | |||
@@ -458,7 +458,7 @@ export default class ServerApi { | |||
458 | 458 | ||
459 | // News | 459 | // News |
460 | async getLatestNews() { | 460 | async getLatestNews() { |
461 | const url = `${apiBase()}/news?platform=${os.platform()}&arch=${os.arch()}&version=${app.getVersion()}`; | 461 | const url = `https://api.getferdi.com/v1/news?platform=${os.platform()}&arch=${os.arch()}&version=${app.getVersion()}`; |
462 | const request = await sendAuthRequest(url); | 462 | const request = await sendAuthRequest(url); |
463 | if (!request.ok) throw request; | 463 | if (!request.ok) throw request; |
464 | const data = await request.json(); | 464 | const data = await request.json(); |
@@ -468,7 +468,7 @@ export default class ServerApi { | |||
468 | } | 468 | } |
469 | 469 | ||
470 | async hideNews(id) { | 470 | async hideNews(id) { |
471 | const request = await sendAuthRequest(`${apiBase()}/news/${id}/read`); | 471 | const request = await sendAuthRequest(`https://api.getferdi.com/v1/news/${id}/read`); |
472 | if (!request.ok) throw request; | 472 | if (!request.ok) throw request; |
473 | debug('ServerApi::hideNews resolves', id); | 473 | debug('ServerApi::hideNews resolves', id); |
474 | } | 474 | } |