Fix bot things

This commit is contained in:
2025-02-07 16:54:42 +07:00
parent cd797711c1
commit 898ff85eed
8 changed files with 86 additions and 86 deletions

View File

@@ -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);