fix(core): update

This commit is contained in:
2018-06-14 22:48:50 +02:00
parent f0c74b1568
commit fe33cfdeaa
7 changed files with 20 additions and 13 deletions

View File

@@ -15,6 +15,7 @@ export let get = async (domainArg: string, optionsArg: interfaces.ISmartRequestO
};
export let getBinary = async (domainArg: string, optionsArg: interfaces.ISmartRequestOptions = {}) => {
const done = plugins.smartq.defer();
const response = await request(domainArg, optionsArg, true);
var data = [];
@@ -26,7 +27,9 @@ export let getBinary = async (domainArg: string, optionsArg: interfaces.ISmartRe
//of all of them together
const buffer = Buffer.concat(data);
response.body = buffer.toString('base64');
done.resolve();
});
await done.promise;
return response;
}