aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/rocketchat/index.js
diff options
context:
space:
mode:
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