refactor: user response.headers instead of deprecated response.meta (#550)

This commit is contained in:
Giancarlos Salas 2018-05-31 15:22:26 -05:00 committed by Gregor Martynus
parent 5f4340f504
commit 70f4a041f6
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ export interface RequestOptions {
}
export interface Result {
meta: {
headers: {
status: string
}
}

View File

@ -14,7 +14,7 @@ export function addLogging (client: GitHubAPI, logger: Logger) {
})
client.hook.after('request', (result, options) => {
const {method, url, headers, ...params} = options
const msg = `GitHub request: ${method} ${url} - ${result.meta.status}`
const msg = `GitHub request: ${method} ${url} - ${result.headers.status}`
logger.debug({params}, msg)
})
}