Skip to content

Commit

Permalink
fix authorization header
Browse files Browse the repository at this point in the history
  • Loading branch information
ideadapt committed Oct 4, 2024
1 parent ebd435f commit d883dbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const editor_password = getConfig('editor_password')
const app = new Application()
const router = new Router()
const ghApiOpts = {
headers: new Headers({'Authorization': gh_gist_token, "X-GitHub-Api-Version": "2022-11-28", 'accept': 'application/json'})
headers: new Headers({'Authorization': 'Bearer ' + gh_gist_token, "X-GitHub-Api-Version": "2022-11-28", 'accept': 'application/json'})
}
const octokit = (path: string, method = 'GET', body: object | null = null) => fetch('https://api.github.com'+path, { method, ...ghApiOpts, body: body ? JSON.stringify(body) : null})
const rawOctokit = (path: string) => fetch('https://gist.githubusercontent.com'+path, ghApiOpts)
Expand Down

0 comments on commit d883dbb

Please sign in to comment.