Fix bot things
This commit is contained in:
@@ -73,11 +73,11 @@ public class DataController : ControllerBase
|
||||
public ActionResult<SpotlightOverview> GetSpotlight()
|
||||
{
|
||||
var overview = _cacheService.GetOrSave(nameof(SpotlightOverview),
|
||||
() => { return _statisticService.GetLastSpotlight(DateTime.Now.AddHours(-3)); }, TimeSpan.FromMinutes(2));
|
||||
() => { return _statisticService.GetLastSpotlight(DateTime.Now.AddDays(-2)); }, TimeSpan.FromMinutes(2));
|
||||
|
||||
if (overview?.Spotlights.Count < overview?.ScenarioCount)
|
||||
if (overview?.Spotlights.Count < overview?.ScenarioCount || overview == null)
|
||||
{
|
||||
overview = _statisticService.GetLastSpotlight(DateTime.Now.AddHours(-3));
|
||||
overview = _statisticService.GetLastSpotlight(DateTime.Now.AddDays(-2));
|
||||
}
|
||||
|
||||
return Ok(overview);
|
||||
|
||||
Reference in New Issue
Block a user