diff options
author | Vijay A <avijayr@protonmail.com> | 2021-08-08 20:42:22 +0530 |
---|---|---|
committer | Vijay A <avijayr@protonmail.com> | 2021-08-08 20:42:22 +0530 |
commit | a77c1533f73199287990f83ce9fb16416c056c46 (patch) | |
tree | 4584bb9d61553436bde77db9aafe1b0a0233030b /src/api | |
parent | refactor(docker): remove unnecessary copy of package config files into Docker... (diff) | |
download | ferdium-app-a77c1533f73199287990f83ce9fb16416c056c46.tar.gz ferdium-app-a77c1533f73199287990f83ce9fb16416c056c46.tar.zst ferdium-app-a77c1533f73199287990f83ce9fb16416c056c46.zip |
fix: fix the changelog api to handle nightly builds
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/apiBase.js | 5 | ||||
-rw-r--r-- | src/api/server/ServerApi.js | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/api/apiBase.js b/src/api/apiBase.js index db974c96f..ad37ca02c 100644 --- a/src/api/apiBase.js +++ b/src/api/apiBase.js | |||
@@ -30,10 +30,7 @@ const apiBase = (withVersion = true) => { | |||
30 | url = window.ferdi.stores.settings.all.app.server; | 30 | url = window.ferdi.stores.settings.all.app.server; |
31 | } | 31 | } |
32 | 32 | ||
33 | if (withVersion) { | 33 | return withVersion ? `${url}/${API_VERSION}` : url; |
34 | return `${url}/${API_VERSION}`; | ||
35 | } | ||
36 | return url; | ||
37 | }; | 34 | }; |
38 | 35 | ||
39 | export default apiBase; | 36 | export default apiBase; |
diff --git a/src/api/server/ServerApi.js b/src/api/server/ServerApi.js index 2111eb80b..bc0b0dff9 100644 --- a/src/api/server/ServerApi.js +++ b/src/api/server/ServerApi.js | |||
@@ -447,7 +447,7 @@ export default class ServerApi { | |||
447 | } | 447 | } |
448 | 448 | ||
449 | async hideNews(id) { | 449 | async hideNews(id) { |
450 | const request = await sendAuthRequest(`${apiBase(true)}/news/${id}/read`); | 450 | const request = await sendAuthRequest(`${apiBase()}/news/${id}/read`); |
451 | if (!request.ok) throw request; | 451 | if (!request.ok) throw request; |
452 | debug('ServerApi::hideNews resolves', id); | 452 | debug('ServerApi::hideNews resolves', id); |
453 | } | 453 | } |