aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcinzelent <zelent.marcin@gmail.com>2017-12-04 10:24:05 +0100
committermarcinzelent <zelent.marcin@gmail.com>2017-12-04 10:24:05 +0100
commit37985c9923e712dc517b03f3280ce44b28090548 (patch)
treeea119c22d3a319f7970c46cc24c052935841d366
parentae24bfaa1a713e17db76ce69394ef9d2f62ad2ef (diff)
Sending e-mail if value is bigger or equal 151.
-rw-r--r--PollutometerWebApi.userprefs4
-rw-r--r--PollutometerWebApi/Controllers/ReadingsController.cs2
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 @@
-<Properties StartupConfiguration="{D19CA1E0-796F-480A-996D-3DFABFC6203F}|Unit Tests">
- <MonoDevelop.Ide.Workbench ActiveDocument="PollutometerWebApi/AqiCalculator.cs">
+<Properties StartupConfiguration="{22C32F4C-0DEB-40EA-9D56-48942CBB2A07}|">
+ <MonoDevelop.Ide.Workbench ActiveDocument="PollutometerWebApi/Controllers/ReadingsController.cs">
<Files>
<File FileName="PollutometerWebApi/AqiCalculator.cs" Line="7" Column="16" />
<File FileName="PollutometerWebApi.Tests/Test.cs" Line="15" Column="1" />
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();
}