update return message

This commit is contained in:
jane 2021-06-04 22:14:18 -04:00
parent 751b8dd6c0
commit 85856da29b

View file

@ -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);
}
});