From a267fbdcac4da48d4be040c5994d201d1cc5d817 Mon Sep 17 00:00:00 2001 From: Darin Krauss Date: Mon, 19 Sep 2016 16:07:27 -0700 Subject: [PATCH] Use new dataservices endpoint (not platform); updates to platform-client --- .config.js | 2 +- config/integration.sh | 2 +- config/staging.sh | 2 +- lib/core/api.js | 2 +- main.js | 8 ++++---- package.json | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.config.js b/.config.js index b386f8cb04..ddbb5bded4 100644 --- a/.config.js +++ b/.config.js @@ -39,7 +39,7 @@ module.exports = { // the defaults for these need to be pointing to prod API_URL: process.env.API_URL || 'https://api.tidepool.org', UPLOAD_URL: process.env.UPLOAD_URL || 'https://uploads.tidepool.org', - DATA_URL: process.env.DATA_URL || 'https://api.tidepool.org/platform', + DATA_URL: process.env.DATA_URL || 'https://api.tidepool.org/dataservices', BLIP_URL: process.env.BLIP_URL || 'https://blip.tidepool.org', DEFAULT_TIMEZONE: process.env.DEFAULT_TIMEZONE || 'America/Los_Angeles', DEFAULT_CARELINK_DAYS: process.env.DEFAULT_CARELINK_DAYS || '180' diff --git a/config/integration.sh b/config/integration.sh index 9e4a7c0b39..b02d453993 100644 --- a/config/integration.sh +++ b/config/integration.sh @@ -1,7 +1,7 @@ export API_URL='https://int-api.tidepool.org' export UPLOAD_URL='https://int-uploads.tidepool.org' export BLIP_URL='https://int-blip.tidepool.org' -export DATA_URL='https://int-api.tidepool.org/platform' +export DATA_URL='https://int-api.tidepool.org/dataservices' export DEBUG_ERROR=false export REDUX_LOG=false export REDUX_DEV_UI=false diff --git a/config/staging.sh b/config/staging.sh index 205c7c8ee6..efccf86890 100644 --- a/config/staging.sh +++ b/config/staging.sh @@ -1,7 +1,7 @@ export API_URL='https://stg-api.tidepool.org' export UPLOAD_URL='https://stg-uploads.tidepool.org' export BLIP_URL='https://stg-blip.tidepool.org' -export DATA_URL='https://stg-api.tidepool.org/platform' +export DATA_URL='https://stg-api.tidepool.org/dataservices' export DEBUG_ERROR=false export REDUX_LOG=false export REDUX_DEV_UI=false diff --git a/lib/core/api.js b/lib/core/api.js index d683934571..bef21f7c9e 100644 --- a/lib/core/api.js +++ b/lib/core/api.js @@ -494,7 +494,7 @@ api.upload.toPlatform = function(data, sessionInfo, progress, groupId, cb, uploa post_dataset_create(uploadItem, function(err, dataset){ if(_.isEmpty(err)){ api.log('created dataset'); - datasetId = _.get(dataset, 'uploadId'); + datasetId = _.get(dataset, 'data.uploadId'); if(_.isEmpty(datasetId)){ api.log('created dataset does not include uploadId'); return callback(new Error(format('Dataset response does not contain uploadId.'))); diff --git a/main.js b/main.js index 3fe7a54ce8..306827d647 100644 --- a/main.js +++ b/main.js @@ -93,25 +93,25 @@ function setServer(window, info) { Development: { API_URL: 'https://dev-api.tidepool.org', UPLOAD_URL: 'https://dev-uploads.tidepool.org', - DATA_URL: 'https://dev-api.tidepool.org/platform', + DATA_URL: 'https://dev-api.tidepool.org/dataservices', BLIP_URL: 'https://dev-blip.tidepool.org' }, Staging: { API_URL: 'https://stg-api.tidepool.org', UPLOAD_URL: 'https://stg-uploads.tidepool.org', - DATA_URL: 'https://stg-api.tidepool.org/platform', + DATA_URL: 'https://stg-api.tidepool.org/dataservices', BLIP_URL: 'https://stg-blip.tidepool.org' }, Integration: { API_URL: 'https://int-api.tidepool.org', UPLOAD_URL: 'https://int-uploads.tidepool.org', - DATA_URL: 'https://int-api.tidepool.org/platform', + DATA_URL: 'https://int-api.tidepool.org/dataservices', BLIP_URL: 'https://int-blip.tidepool.org' }, Production: { API_URL: 'https://api.tidepool.org', UPLOAD_URL: 'https://uploads.tidepool.org', - DATA_URL: 'https://api.tidepool.org/platform', + DATA_URL: 'https://api.tidepool.org/dataservices', BLIP_URL: 'https://blip.tidepool.org' } }; diff --git a/package.json b/package.json index a8f2f8ce33..a8a01d74c7 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "semver": "5.1.0", "stack-trace": "0.0.9", "sundial": "1.6.0", - "tidepool-platform-client": "0.27.0" + "tidepool-platform-client": "0.28.0" }, "devDependencies": { "babel-core": "5.8.38",