diff options
author | 2021-09-12 15:58:12 +0530 | |
---|---|---|
committer | 2021-09-12 15:58:12 +0530 | |
commit | 93738624ed1dd4473fb4e6cdfb859e6250437104 (patch) | |
tree | 567024bee405a95be8957ba7e77a68b094bc09cd /recipes/github_entreprise/index.js | |
parent | New recipe: 'udemy' (fixes #464) (#696) (diff) | |
download | ferdium-recipes-93738624ed1dd4473fb4e6cdfb859e6250437104.tar.gz ferdium-recipes-93738624ed1dd4473fb4e6cdfb859e6250437104.tar.zst ferdium-recipes-93738624ed1dd4473fb4e6cdfb859e6250437104.zip |
Merged 'github_enterprise' recipe into 'github' with the extra bits.
Diffstat (limited to 'recipes/github_entreprise/index.js')
-rw-r--r-- | recipes/github_entreprise/index.js | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/recipes/github_entreprise/index.js b/recipes/github_entreprise/index.js deleted file mode 100644 index f45d240..0000000 --- a/recipes/github_entreprise/index.js +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | module.exports = Ferdi => class GitHubEnterprise extends Ferdi { | ||
2 | async validateUrl(url) { | ||
3 | try { | ||
4 | const resp = await window.fetch(`${url}/api/v3`, { | ||
5 | method: 'GET', | ||
6 | headers: { | ||
7 | 'Content-Type': 'application/json', | ||
8 | Accept: 'application/vnd.github.v3+json', | ||
9 | }, | ||
10 | }); | ||
11 | // doc: https://developer.github.com/enterprise/2.17/v3/#current-version | ||
12 | return resp.status.toString().startsWith('2'); | ||
13 | } catch (err) { | ||
14 | console.error(err); | ||
15 | } | ||
16 | |||
17 | return false; | ||
18 | } | ||
19 | }; | ||