This commit is contained in:
jane 2021-06-04 15:39:53 -04:00
parent 6d4b10ae4b
commit e13e57a66b
2 changed files with 3 additions and 2 deletions

View file

@ -8,6 +8,7 @@ const log = new Logger("server", cfg.log_level ? levels[cfg.log_level] : levels.
export default function parse(data) {
log.info(data)
return {
data: data,
errors: ["not yet implemented"]
}
}

View file

@ -27,10 +27,10 @@ export function recv(callback, errorCallback) {
// con.write(functions_str);
// log.debug(`sending ${functions_str}`);
con.on('data', (data) => {
let parsed_data = parse(data);
let parsed_data = parse(String(data));
if (parsed_data.errors) {
con.write(JSON.stringify(parsed_data.errors));
con.write(JSON.stringify(parsed_data));
errorCallback(parsed_data);
}
else {