diff options
author | Vijay A <avijayr@protonmail.com> | 2021-07-31 15:28:23 +0530 |
---|---|---|
committer | Vijay A <avijayr@protonmail.com> | 2021-07-31 15:28:23 +0530 |
commit | 97697e3d069972844b2912a93022f4a4904a40d6 (patch) | |
tree | 53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/zulip/index.js | |
parent | Allow any url in the custom-service to allow for sites like 'http://translate... (diff) | |
download | ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.gz ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.zst ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.zip |
Fixed eslintrc as root for this folder; Reformatted all files.
Diffstat (limited to 'recipes/zulip/index.js')
-rw-r--r-- | recipes/zulip/index.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/recipes/zulip/index.js b/recipes/zulip/index.js index 199d0f4..cd8ffea 100644 --- a/recipes/zulip/index.js +++ b/recipes/zulip/index.js | |||
@@ -1,13 +1,13 @@ | |||
1 | module.exports = Franz => class Zulip extends Franz { | 1 | module.exports = Franz => class Zulip extends Franz { |
2 | async validateUrl(url) { | 2 | async validateUrl(url) { |
3 | const baseUrl = new window.URL(url); | 3 | const baseUrl = new window.URL(url); |
4 | const apiVersion = 'api/v1' | 4 | const apiVersion = 'api/v1'; |
5 | try { | 5 | try { |
6 | const resp = await window.fetch(`${baseUrl.origin}/${apiVersion}/server_settings`, { | 6 | const resp = await window.fetch(`${baseUrl.origin}/${apiVersion}/server_settings`, { |
7 | method: 'GET', | 7 | method: 'GET', |
8 | headers: { | 8 | headers: { |
9 | 'Content-Type': 'application/json', | 9 | 'Content-Type': 'application/json', |
10 | }, | 10 | }, |
11 | }); | 11 | }); |
12 | const data = await resp.json(); | 12 | const data = await resp.json(); |
13 | 13 | ||