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