Skip to content

Commit

Permalink
Fix ws (#58)
Browse files Browse the repository at this point in the history
* Fix ws get schema

* 7.0.2
  • Loading branch information
markwylde committed Jun 2, 2021
1 parent 9b3e032 commit c3fc56b
Show file tree
Hide file tree
Showing 4 changed files with 386 additions and 130 deletions.
7 changes: 5 additions & 2 deletions lib/actions/ws/getAll.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function handleGetAll (acceptId, state, data, socket) {
});

if (responses.find(response => response[STATUS] >= 500)) {
socket.send(JSON.stringify(['A', acceptId, responses]));
socket.send(JSON.stringify(['A', acceptId, responses[0]]));
return;
}

Expand All @@ -47,7 +47,10 @@ async function handleGetAll (acceptId, state, data, socket) {
});
}

socket.send(JSON.stringify(['A', acceptId, results]));
socket.send(JSON.stringify(['A', acceptId, {
[STATUS]: 200,
[DOCUMENTS]: results
}]));
}

module.exports = handleGetAll;
Loading

0 comments on commit c3fc56b

Please sign in to comment.