mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix: GitHub API response is in snake case
This commit is contained in:
parent
1e9904ff10
commit
c8ffcc3090
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ async function oauth(code: string) {
|
|||
})
|
||||
|
||||
const body = await res.json()
|
||||
const { accessToken, scope, error_description: errorDescription } = body
|
||||
const { access_token: accessToken, scope, error_description: errorDescription } = body
|
||||
if (errorDescription) {
|
||||
throw new Error(errorDescription)
|
||||
} else if (scope !== 'repo' || !accessToken || !(typeof accessToken === 'string')) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue