File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
src/renderer/store/modules Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { remote } from 'electron';
6
6
import packageJson from '../../../../package' ;
7
7
8
8
const Octokit = require ( '@octokit/rest' ) ;
9
- let octokit = new Octokit ( {
9
+ let octokit = Octokit ( {
10
10
userAgent : 'code-notes' . concat ( packageJson . version ) ,
11
11
mediaType : {
12
12
format : 'application/vnd.github.v3+json' ,
@@ -56,14 +56,15 @@ const actions = {
56
56
store . commit ( 'LOAD_NOTES' , [ ] ) ;
57
57
58
58
if ( store . rootState . Settings . settings . githubEnterpriseUrl ) {
59
- octokit = Octokit ( {
59
+ octokit = new Octokit ( {
60
60
baseUrl : store . rootState . Settings . settings . githubEnterpriseUrl ,
61
+ auth : store . rootState . Settings . settings . githubPersonalAccessToken ,
62
+ } ) ;
63
+ } else {
64
+ octokit = new Octokit ( {
65
+ auth : store . rootState . Settings . settings . githubPersonalAccessToken ,
61
66
} ) ;
62
67
}
63
- octokit = Octokit ( {
64
- auth : store . rootState . Settings . settings . githubPersonalAccessToken ,
65
- } ) ;
66
-
67
68
octokit . gists . list ( ) . then ( ( res ) => {
68
69
const promises = [ ] ;
69
70
You can’t perform that action at this time.
0 commit comments