Skip to content

Commit

Permalink
Merge pull request #56 from nightscout/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
swissalpine authored Aug 7, 2023
2 parents b7bfdae + d602de1 commit 400edd1
Show file tree
Hide file tree
Showing 5 changed files with 408 additions and 465 deletions.
8 changes: 4 additions & 4 deletions lib/api2/summary/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ function configure (env, ctx) {
if (t.insulin || t.carbs) {
if (t.mills >= dataCap) {
const _t = {
mills: t.mills,
carbs: t.carbs,
insulin: t.insulin
}
mills: t.mills
};
if (!isNaN(t.carbs)) _t.carbs = t.carbs;
if (!isNaN(t.insulin)) _t.insulin = t.insulin;
rVal.treatments.push(_t);
}
continue;
Expand Down
3 changes: 2 additions & 1 deletion lib/server/loop.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//'use strict';

const apn = require('apn');
const apn = require('@parse/node-apn');

function init (env, ctx) {

Expand Down Expand Up @@ -128,6 +128,7 @@ function init (env, ctx) {
notification.topic = loopSettings.bundleIdentifier;
notification.contentAvailable = 1;
notification.payload = payload;
notification.interruptionLevel = "time-sensitive"

provider.send(notification, [loopSettings.deviceToken]).then( (response) => {
if (response.sent && response.sent.length > 0) {
Expand Down
168 changes: 56 additions & 112 deletions package-lock.json

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

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,11 @@
"dependencies": {
"@babel/core": "^7.18.10",
"@babel/preset-env": "^7.18.10",
"@parse/node-apn": "^5.1.3",
"acorn": "^8.0.5",
"acorn-jsx": "^5.3.1",
"apn": "^2.2.0",
"async": "^0.9.2",
"babel-loader": "^8.2.5",
"base64url": "^3.0.1",
"body-parser": "^1.19.0",
"bootevent": "0.0.1",
"braces": "^3.0.2",
Expand Down Expand Up @@ -117,10 +116,9 @@
"mongo-url-parser": "^1.0.2",
"mongodb": "^3.6.0",
"mongomock": "^0.1.2",
"nightscout-connect": "^0.0.6",
"nightscout-connect": "0.0.10",
"node-cache": "^4.2.1",
"parse-duration": "^0.1.3",
"pem": "^1.14.4",
"process": "^0.11.10",
"pushover-notifications": "^1.2.2",
"random-token": "0.0.8",
Expand Down
Loading

0 comments on commit 400edd1

Please sign in to comment.