update return message
This commit is contained in:
parent
751b8dd6c0
commit
85856da29b
1 changed files with 2 additions and 2 deletions
|
@ -30,11 +30,11 @@ export function recv(callback, errorCallback) {
|
|||
let parsed_data = parse(String(data));
|
||||
|
||||
if (parsed_data.errors != undefined && parsed_data.errors.length > 0) {
|
||||
con.write(JSON.stringify(parsed_data));
|
||||
con.write(`error ..\n${JSON.stringify(parsed_data)}`);
|
||||
errorCallback(parsed_data);
|
||||
}
|
||||
else {
|
||||
con.write("success");
|
||||
con.write(`success ..\n${JSON.stringify(parsed_data)}`);
|
||||
callback(data);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue