diff options
author | 2021-07-31 15:28:23 +0530 | |
---|---|---|
committer | 2021-07-31 15:28:23 +0530 | |
commit | 97697e3d069972844b2912a93022f4a4904a40d6 (patch) | |
tree | 53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/github_entreprise/index.js | |
parent | Allow any url in the custom-service to allow for sites like 'http://translate... (diff) | |
download | ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.gz ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.zst ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.zip |
Fixed eslintrc as root for this folder; Reformatted all files.
Diffstat (limited to 'recipes/github_entreprise/index.js')
-rw-r--r-- | recipes/github_entreprise/index.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/recipes/github_entreprise/index.js b/recipes/github_entreprise/index.js index f15e5cb..2ffc5ee 100644 --- a/recipes/github_entreprise/index.js +++ b/recipes/github_entreprise/index.js | |||
@@ -1,5 +1,3 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => class GitHubEnterprise extends Franz { | 1 | module.exports = Franz => class GitHubEnterprise extends Franz { |
4 | async validateUrl(url) { | 2 | async validateUrl(url) { |
5 | try { | 3 | try { |
@@ -7,10 +5,10 @@ module.exports = Franz => class GitHubEnterprise extends Franz { | |||
7 | method: 'GET', | 5 | method: 'GET', |
8 | headers: { | 6 | headers: { |
9 | 'Content-Type': 'application/json', | 7 | 'Content-Type': 'application/json', |
10 | 'Accept': 'application/vnd.github.v3+json' | 8 | Accept: 'application/vnd.github.v3+json', |
11 | }, | 9 | }, |
12 | }); | 10 | }); |
13 | //doc: https://developer.github.com/enterprise/2.17/v3/#current-version | 11 | // doc: https://developer.github.com/enterprise/2.17/v3/#current-version |
14 | return resp.status.toString().startsWith('2'); | 12 | return resp.status.toString().startsWith('2'); |
15 | } catch (err) { | 13 | } catch (err) { |
16 | console.error(err); | 14 | console.error(err); |
@@ -18,4 +16,4 @@ module.exports = Franz => class GitHubEnterprise extends Franz { | |||
18 | 16 | ||
19 | return false; | 17 | return false; |
20 | } | 18 | } |
21 | }; \ No newline at end of file | 19 | }; |