aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/mattermost/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/mattermost/index.js')
-rw-r--r--recipes/mattermost/index.js9
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
3module.exports = Franz => class Mattermost extends Franz { 1module.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