Skip to content

Commit

Permalink
Revert part of changes from previous merge
Browse files Browse the repository at this point in the history
  • Loading branch information
sulkaharo committed Sep 22, 2017
1 parent b1a9f86 commit d7d5e8a
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 15 deletions.
11 changes: 0 additions & 11 deletions lib/data/dataloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ function init(env, ctx) {
, loadProfileSwitchTreatments.bind(null, ddata, ctx)
, loadSensorAndInsulinTreatments.bind(null, ddata, ctx)
, loadProfile.bind(null, ddata, ctx)
, loadFood.bind(null, ddata, ctx)
, loadDeviceStatus.bind(null, ddata, env, ctx)
], loadComplete);

Expand Down Expand Up @@ -250,16 +249,6 @@ function loadProfile (ddata, ctx, callback) {
});
}

function loadFood (ddata, ctx, callback) {
ctx.food.list(function (err, results) {
if (!err && results) {
ddata.food = results;

}
callback();
});
}

function loadDeviceStatus (ddata, env, ctx, callback) {
var dateRange = {
$gte: new Date(ddata.lastUpdated - ONE_DAY).toISOString()
Expand Down
2 changes: 0 additions & 2 deletions lib/data/ddata.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ function init( ) {
, cals: []
, profiles: []
, devicestatus: []
, food: []
, lastUpdated: 0
};

Expand Down Expand Up @@ -67,7 +66,6 @@ function init( ) {
result.first.profiles = ddata.profiles;

result.rest.mbgs = ddata.mbgs.filter(filterMax);
result.rest.food = ddata.food;

console.log('results.first size', JSON.stringify(result.first).length,'bytes');
console.log('results.rest size', JSON.stringify(result.rest).length,'bytes');
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}
},
"engines": {
"node": "8.5.0",
"node": "8.5.0"
},
"dependencies": {
"ajv": "^5.2.2",
Expand Down

0 comments on commit d7d5e8a

Please sign in to comment.