diff options
author | 2021-07-31 15:28:23 +0530 | |
---|---|---|
committer | 2021-07-31 15:28:23 +0530 | |
commit | 97697e3d069972844b2912a93022f4a4904a40d6 (patch) | |
tree | 53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/mattermost/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/mattermost/index.js')
-rw-r--r-- | recipes/mattermost/index.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/recipes/mattermost/index.js b/recipes/mattermost/index.js index 8f814fa..8ae5c17 100644 --- a/recipes/mattermost/index.js +++ b/recipes/mattermost/index.js | |||
@@ -1,13 +1,11 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => class Mattermost extends Franz { | 1 | module.exports = Franz => class Mattermost extends Franz { |
4 | async validateUrl(url) { | 2 | async validateUrl(url) { |
5 | try { | 3 | try { |
6 | const resp = await window.fetch(url, { | 4 | const resp = await window.fetch(url, { |
7 | method: 'GET', | 5 | method: 'GET', |
8 | headers: { | 6 | headers: { |
9 | 'Content-Type': 'application/json' | 7 | 'Content-Type': 'application/json', |
10 | } | 8 | }, |
11 | }); | 9 | }); |
12 | return resp.status.toString().startsWith('2'); | 10 | return resp.status.toString().startsWith('2'); |
13 | } catch (err) { | 11 | } catch (err) { |
@@ -16,5 +14,4 @@ module.exports = Franz => class Mattermost extends Franz { | |||
16 | 14 | ||
17 | return false; | 15 | return false; |
18 | } | 16 | } |
19 | 17 | }; | |
20 | }; \ No newline at end of file | ||