From 728d339739b63e9bb59e457e4a84fe9a65b93fc9 Mon Sep 17 00:00:00 2001 From: vantezzen Date: Sat, 28 Sep 2019 12:10:25 +0200 Subject: Add uncompressed recipes --- uncompressed/mattermost/index.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 uncompressed/mattermost/index.js (limited to 'uncompressed/mattermost/index.js') diff --git a/uncompressed/mattermost/index.js b/uncompressed/mattermost/index.js new file mode 100644 index 0000000..8f814fa --- /dev/null +++ b/uncompressed/mattermost/index.js @@ -0,0 +1,20 @@ +"use strict"; + +module.exports = Franz => class Mattermost extends Franz { + async validateUrl(url) { + try { + const resp = await window.fetch(url, { + method: 'GET', + headers: { + 'Content-Type': 'application/json' + } + }); + return resp.status.toString().startsWith('2'); + } catch (err) { + console.error(err); + } + + return false; + } + +}; \ No newline at end of file -- cgit v1.2.3-54-g00ecf