aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/rocketchat/index.js
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-07-31 15:28:23 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-07-31 15:28:23 +0530
commit97697e3d069972844b2912a93022f4a4904a40d6 (patch)
tree53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/rocketchat/index.js
parentAllow any url in the custom-service to allow for sites like 'http://translate... (diff)
downloadferdium-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/rocketchat/index.js')
-rw-r--r--recipes/rocketchat/index.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/recipes/rocketchat/index.js b/recipes/rocketchat/index.js
index 54450ce..499053a 100644
--- a/recipes/rocketchat/index.js
+++ b/recipes/rocketchat/index.js
@@ -1,13 +1,11 @@
1"use strict";
2
3module.exports = Franz => class RocketChat extends Franz { 1module.exports = Franz => class RocketChat 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 const status = resp.status.toString(); 10 const status = resp.status.toString();
13 return status.startsWith('2') || status.startsWith('3'); 11 return status.startsWith('2') || status.startsWith('3');
@@ -17,5 +15,4 @@ module.exports = Franz => class RocketChat extends Franz {
17 15
18 return false; 16 return false;
19 } 17 }
20 18};
21}; \ No newline at end of file