stringify callbacks
This commit is contained in:
parent
a4b28f5cdb
commit
5ef3a74b15
1 changed files with 2 additions and 2 deletions
|
@ -31,11 +31,11 @@ export function recv(callback, errorCallback) {
|
|||
|
||||
if (parsed_data.errors != undefined && parsed_data.errors.length > 0) {
|
||||
con.write(`error ..\n${JSON.stringify(parsed_data)}`);
|
||||
errorCallback(parsed_data);
|
||||
errorCallback(JSON.stringify(parsed_data));
|
||||
}
|
||||
else {
|
||||
con.write(`success ..\n${JSON.stringify(parsed_data)}`);
|
||||
callback(parsed_data);
|
||||
callback(JSON.stringify(parsed_data));
|
||||
}
|
||||
});
|
||||
con.on('close', () => {
|
||||
|
|
Loading…
Reference in a new issue