From 37985c9923e712dc517b03f3280ce44b28090548 Mon Sep 17 00:00:00 2001 From: marcinzelent Date: Mon, 4 Dec 2017 10:24:05 +0100 Subject: Sending e-mail if value is bigger or equal 151. --- PollutometerWebApi.userprefs | 4 ++-- PollutometerWebApi/Controllers/ReadingsController.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PollutometerWebApi.userprefs b/PollutometerWebApi.userprefs index 34c119a..8266a5d 100644 --- a/PollutometerWebApi.userprefs +++ b/PollutometerWebApi.userprefs @@ -1,5 +1,5 @@ - - + + diff --git a/PollutometerWebApi/Controllers/ReadingsController.cs b/PollutometerWebApi/Controllers/ReadingsController.cs index f915e17..c80599f 100644 --- a/PollutometerWebApi/Controllers/ReadingsController.cs +++ b/PollutometerWebApi/Controllers/ReadingsController.cs @@ -67,7 +67,7 @@ namespace PollutometerWebApi.Controllers { SqlOperator.PostReading(reading); var aqi = AqiCalculator.CalculateAqi(reading); - if (aqi.Value > 151) + if (aqi.Value >= 151) EmailSender.SendEmail(aqi); return Ok(); } -- cgit v1.2.3