diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2023-09-11 08:26:05 +0530 |
---|---|---|
committer | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2023-09-11 02:59:47 +0000 |
commit | 446cc2d05ee3a5ca66eabd1e109ba23778d8838c (patch) | |
tree | 7a6346efd41e4f37791c7615deae27de44939165 /recipes/hipchat/index.js | |
parent | Update icons (#419) (diff) | |
download | ferdium-recipes-446cc2d05ee3a5ca66eabd1e109ba23778d8838c.tar.gz ferdium-recipes-446cc2d05ee3a5ca66eabd1e109ba23778d8838c.tar.zst ferdium-recipes-446cc2d05ee3a5ca66eabd1e109ba23778d8838c.zip |
Remove references to hipchat
Diffstat (limited to 'recipes/hipchat/index.js')
-rw-r--r-- | recipes/hipchat/index.js | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/recipes/hipchat/index.js b/recipes/hipchat/index.js deleted file mode 100644 index e786bcb..0000000 --- a/recipes/hipchat/index.js +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | function _asyncToGenerator(fn) { | ||
2 | return function () { | ||
3 | const gen = Reflect.apply(fn, this, arguments); | ||
4 | return new Promise((resolve, reject) => { | ||
5 | function step(key, arg) { | ||
6 | try { | ||
7 | var info = gen[key](arg); | ||
8 | var value = info.value; | ||
9 | } catch (error) { | ||
10 | reject(error); | ||
11 | return; | ||
12 | } | ||
13 | if (info.done) { | ||
14 | resolve(value); | ||
15 | } else { | ||
16 | // eslint-disable-next-line consistent-return | ||
17 | return Promise.resolve(value).then( | ||
18 | value => { | ||
19 | step('next', value); | ||
20 | }, | ||
21 | error => { | ||
22 | step('throw', error); | ||
23 | }, | ||
24 | ); | ||
25 | } | ||
26 | } | ||
27 | return step('next'); | ||
28 | }); | ||
29 | }; | ||
30 | } | ||
31 | |||
32 | module.exports = Ferdium => | ||
33 | class HipChat extends Ferdium { | ||
34 | validateUrl(url) { | ||
35 | return _asyncToGenerator(function* () { | ||
36 | try { | ||
37 | const resp = yield window.fetch(`${url}/api/features`, { | ||
38 | method: 'GET', | ||
39 | headers: { | ||
40 | 'Content-Type': 'application/json', | ||
41 | }, | ||
42 | }); | ||
43 | const data = yield resp.json(); | ||
44 | |||
45 | return Object.hasOwnProperty.call(data, 'features'); | ||
46 | } catch (error) { | ||
47 | console.error(error); | ||
48 | } | ||
49 | |||
50 | return false; | ||
51 | })(); | ||
52 | } | ||
53 | |||
54 | buildUrl(url) { | ||
55 | return `${url}/chat`; | ||
56 | } | ||
57 | }; | ||