From 7edae630272b2c12c4ad59a9fdb8818ad303db2b Mon Sep 17 00:00:00 2001 From: Pete ba Date: Mon, 27 May 2019 04:09:21 +0100 Subject: [PATCH 1/2] Revert California Restrictions check --- routes/weather.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/weather.ts b/routes/weather.ts index be4f644..dc4c053 100644 --- a/routes/weather.ts +++ b/routes/weather.ts @@ -221,6 +221,7 @@ export const getWateringData = async function( req: express.Request, res: expres // parsed. This allows the adjustment method and the restriction type to both // be saved in the same byte. let adjustmentMethod: number = req.params[ 0 ] & ~( 1 << 7 ), + checkRestrictions: boolean = ( ( req.params[ 0 ] >> 7 ) & 1 ) > 0, adjustmentOptionsString: string = getParameter(req.query.wto), location: string | GeoCoordinates = getParameter(req.query.loc), outputFormat: string = getParameter(req.query.format), @@ -262,7 +263,7 @@ export const getWateringData = async function( req: express.Request, res: expres let wateringData: WateringData; if ( local.useLocalWeather() ) { wateringData = await getLocalWateringData( coordinates ); - } else if ( adjustmentMethod !== 0 ) { + } else if ( adjustmentMethod !== 0 || checkRestrictions ) { wateringData = await weatherProvider.getWateringData(coordinates); } From a3882f0a32f27d9f4f7054c4c85bb848acf340bf Mon Sep 17 00:00:00 2001 From: Samer Albahra Date: Sun, 26 May 2019 23:13:07 -0500 Subject: [PATCH 2/2] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 536b9f5..28b217e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "os-weather-service", "description": "OpenSprinkler Weather Service", - "version": "1.0.2", + "version": "1.0.3", "repository": "https://github.com/OpenSprinkler/Weather-Weather", "scripts": { "test": "mocha --exit --require ts-node/register **/*.spec.ts",