Skip to content

Commit

Permalink
fixed bad URL when querying nightscout with a last result time
Browse files Browse the repository at this point in the history
  • Loading branch information
Delubear committed Dec 23, 2020
1 parent 7c121b7 commit cf7d3c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion GlucoseTrayCore/Services/GlucoseFetchService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private async Task<List<GlucoseResult>> GetResultsFromNightscout(DateTime? timeO
var fromDate = timeOflastGoodResult.Value.AddSeconds(1).ToString("s") + "Z";
var toDate = DateTime.UtcNow.ToString("s") + "Z";

url = $"{_options.CurrentValue.NightscoutUrl}/api/v1/entries/sgv,json?find[dateString][$gte]={fromDate}&find[dateString][$lte]={toDate}&count={maximumCount}{(!string.IsNullOrWhiteSpace(_options.CurrentValue.AccessToken) ? $"&token={_options.CurrentValue.AccessToken}" : "")}";
url = $"{_options.CurrentValue.NightscoutUrl}/api/v1/entries/sgv?find[dateString][$gte]={fromDate}&find[dateString][$lte]={toDate}&count={maximumCount}{(!string.IsNullOrWhiteSpace(_options.CurrentValue.AccessToken) ? $"&token={_options.CurrentValue.AccessToken}" : "")}";
}
else
url = $"{_options.CurrentValue.NightscoutUrl}/api/v1/entries/sgv?count=1" + (!string.IsNullOrWhiteSpace(_options.CurrentValue.AccessToken) ? $"&token={_options.CurrentValue.AccessToken}" : "");
Expand Down
2 changes: 1 addition & 1 deletion GlucoseTrayCore/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"appsettings": {
"Version": "11.0.2"
"Version": "11.0.3"
}
}

0 comments on commit cf7d3c8

Please sign in to comment.