0
mirror of https://github.com/valentineus/iii-client.git synced 2025-07-04 11:00:26 +03:00

Release of version 1.1.2.

This commit is contained in:
Valentin Popov
2017-06-10 20:42:29 +00:00
parent ea726a55b9
commit 5bcfdc853b
6 changed files with 33 additions and 16 deletions

View File

@ -69,7 +69,10 @@ function connect(uuid, callback) {
const request = http.request(query, function(response) {
var json = '';
response.on('data', (raw) => json = decryptJSON(raw));
response.on('end', () => callback(json.result));
response.on('end', () => {
if (json.error) throw new Error(json.error.message);
callback(json.result);
});
});
request.on('error', (error) => Error(error.message));
@ -100,7 +103,10 @@ function send(raw, callback) {
const request = http.request(query, function(response) {
var json = '';
response.on('data', (raw) => json = decryptJSON(raw));
response.on('end', () => callback(json.result));
response.on('end', () => {
if (json.error) throw new Error(json.error.message);
callback(json.result);
});
});
request.on('error', (error) => Error(error));
@ -219,7 +225,7 @@ function isVerification(data) {
<br class="clear">
<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Mon Jun 05 2017 16:37:40 GMT+0000 (UTC) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Sat Jun 10 2017 20:41:57 GMT+0000 (UTC) using the Minami theme.
</footer>
<script>prettyPrint();</script>