Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

Commit fa256e4

Browse files
committed
fix-request-02
1 parent 7deebe4 commit fa256e4

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/renderer/store/modules/Note.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { remote } from 'electron';
66
import packageJson from '../../../../package';
77

88
const Octokit = require('@octokit/rest');
9-
let octokit = new Octokit({
9+
let octokit = Octokit({
1010
userAgent: 'code-notes'.concat(packageJson.version),
1111
mediaType: {
1212
format: 'application/vnd.github.v3+json',
@@ -56,14 +56,15 @@ const actions = {
5656
store.commit('LOAD_NOTES', []);
5757

5858
if (store.rootState.Settings.settings.githubEnterpriseUrl) {
59-
octokit = Octokit({
59+
octokit = new Octokit({
6060
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,
6166
});
6267
}
63-
octokit = Octokit({
64-
auth: store.rootState.Settings.settings.githubPersonalAccessToken,
65-
});
66-
6768
octokit.gists.list().then((res) => {
6869
const promises = [];
6970

0 commit comments

Comments
 (0)