fixes for listen and transcribe

This commit is contained in:
Dave Horton
2020-01-25 16:39:37 -05:00
parent 0df1e44f15
commit 03e8727c8b
3 changed files with 16 additions and 7 deletions

View File

@@ -8,7 +8,7 @@ function hooks(logger, callAttributes) {
if (auth && typeof auth === 'object' && Object.keys(auth) === 2) basicauth = auth;
if ('GET' === method.toUpperCase()) qs = params;
else body = params;
const obj = {url, method, auth: basicauth, json: expectResponse || body, qs, body};
const obj = {url, method, auth: basicauth, json: expectResponse || !!body, qs, body};
logger.debug({opts: obj}, 'actionHook');
return new Promise((resolve, reject) => {
request(obj, (err, response, body) => {