refactor: github.request(route, options) is so pretty

This commit is contained in:
Gregor 2019-01-08 00:24:35 -08:00
parent 291824960c
commit 6dc8dccdf8
1 changed files with 3 additions and 4 deletions

View File

@ -58,10 +58,9 @@ export class ManifestCreation {
public async createAppFromCode (code: any) {
const github = GitHubAPI()
const response = await github.request({
headers: { accept: 'application/vnd.github.fury-preview+json' },
method: 'POST',
url: `/app-manifests/${code}/conversions`
const response = await github.request('POST /app-manifests/:code/conversions', {
code,
headers: { accept: 'application/vnd.github.fury-preview+json' }
})
const { id, webhook_secret, pem } = response.data