From 1030b1c41a729db143819bbb7c03b380b06b839e Mon Sep 17 00:00:00 2001 From: Mark van der Wal Date: Thu, 3 Sep 2020 10:37:24 +0200 Subject: [PATCH] removed logging in weather service. changed moment to peerdependency. --- package.json | 3 ++- projects/common/package.json | 4 +--- projects/common/src/fm/services/weather.service.ts | 5 +---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index f12e7d6..4074ffd 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,8 @@ "rxjs": "^6.5.4", "tassign": "^1.0.0", "tslib": "^1.10.0", - "zone.js": "~0.10.2" + "zone.js": "~0.10.2", + "moment": "^2.27.0" }, "devDependencies": { "@angular-devkit/build-angular": "~0.901.0", diff --git a/projects/common/package.json b/projects/common/package.json index e902784..f5e21e7 100644 --- a/projects/common/package.json +++ b/projects/common/package.json @@ -17,9 +17,7 @@ "@aspnet/signalr": "^1.1.4", "font-awesome": "^4.7.0", "ngx-uploadx": "^3.3.4", - "angular-oauth2-oidc": "^9.1" - }, - "dependencies": { + "angular-oauth2-oidc": "^9.1", "moment": "^2.27.0" } } diff --git a/projects/common/src/fm/services/weather.service.ts b/projects/common/src/fm/services/weather.service.ts index 9289938..f2b0511 100644 --- a/projects/common/src/fm/services/weather.service.ts +++ b/projects/common/src/fm/services/weather.service.ts @@ -2,7 +2,7 @@ import {Injectable} from '@angular/core'; import {HttpClient} from '@angular/common/http'; import {Observable} from 'rxjs'; import {GeoJSON} from 'ol/format'; -import {map, switchMap, tap} from 'rxjs/operators'; +import {map, switchMap} from 'rxjs/operators'; import {getCenter} from 'ol/extent'; import moment from 'moment'; import {AppConfig} from '../shared/app.config'; @@ -40,13 +40,11 @@ export class WeatherService { startDate.setDate(startDate.getDate() - daysBefore); startDate.setHours(0, 0, 0, 0); const startDateString = moment(startDate).local().format('YYYY-MM-DD[T]HH:mm:ss'); - console.log(startDateString); const endDate = new Date(); endDate.setDate(endDate.getDate() + daysAfter); endDate.setHours(23, 0, 0, 0); const endDateString = moment(endDate).local().format('YYYY-MM-DD[T]HH:mm:ss'); - console.log(endDateString); return this.getWeatherRange(centroid, startDateString, endDateString); } @@ -70,7 +68,6 @@ export class WeatherService { switchMap(h => { return this.httpClient.get(forecast) .pipe( - tap(v => console.log(v)), map(f => [...h, ...f.filter(fd => fd.time <= endDate)] )); }) );