feat: clear old records

This commit is contained in:
2025-02-02 20:31:52 +03:00
parent b3a0964aac
commit dc08285ec8

View File

@ -102,10 +102,18 @@ public class ScheduleController(ILogger<ScheduleController> logger, IOptionsSnap
/// </summary>
/// <returns>Cron update skip dates.</returns>
[HttpGet("CronUpdateSkip")]
public ActionResult<List<CronUpdateSkip>> CronUpdateSkip() =>
config.Value.ScheduleSettings!.CronUpdateSkipDateList
.Filter()
public ActionResult<List<CronUpdateSkip>> CronUpdateSkip()
{
var generalConfig = config.Value;
generalConfig.ScheduleSettings!.CronUpdateSkipDateList =
generalConfig.ScheduleSettings.CronUpdateSkipDateList.Filter();
generalConfig.SaveSetting();
return generalConfig.ScheduleSettings!.CronUpdateSkipDateList
.ConvertToDto();
}
/// <summary>
/// Updates the list of cron update skip dates in the configuration.