Skip to content

Commit

Permalink
Merge pull request #1538 from MilosKozak/dev
Browse files Browse the repository at this point in the history
ws dedup update
  • Loading branch information
MilosKozak committed Mar 1, 2016
2 parents 15099d3 + d578041 commit 1fb349c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,22 @@ function init (env, ctx, server) {

var query_similiar = {
created_at: {$gte: new Date(new Date(data.data.created_at).getTime() - maxtimediff).toISOString(), $lte: new Date(new Date(data.data.created_at).getTime() + maxtimediff).toISOString()}
, eventType: data.data.eventType
};
if (data.data.insulin) {
query_similiar.insulin = data.data.insulin;
}
if (data.data.carbs) {
query_similiar.carbs = data.data.carbs;
}
if (data.data.percent) {
query_similiar.percent = data.data.percent;
}
if (data.data.absolute) {
query_similiar.absolute = data.data.absolute;
}
if (data.data.duration) {
query_similiar.duration = data.data.duration;
}
if (data.data.happ_id) {
query_similiar.happ_id = data.data.happ_id;
}
Expand Down

0 comments on commit 1fb349c

Please sign in to comment.