docs: add some specification

This commit is contained in:
2024-10-25 04:43:18 +03:00
parent 0788c36bd2
commit 4605c81895
2 changed files with 17 additions and 0 deletions

View File

@ -21,10 +21,18 @@ namespace Mirea.Api.Endpoint.Controllers.V1;
[CacheMaxAge(true)]
public class ScheduleController(IMediator mediator, IOptionsSnapshot<GeneralConfig> config) : BaseController
{
/// <summary>
/// Retrieves the start term for the schedule.
/// </summary>
/// <returns>The start term as a <see cref="DateOnly"/> value.</returns>
[CacheMaxAge(1, 0)]
[HttpGet("StartTerm")]
public ActionResult<DateOnly> GetStartTerm() => config.Value.ScheduleSettings!.StartTerm;
/// <summary>
/// Retrieves the pair periods.
/// </summary>
/// <returns>A dictionary of pair periods, where the key is an integer identifier and the value is a <see cref="PairPeriodTime"/> object.</returns>
[CacheMaxAge(1, 0)]
[HttpGet("PairPeriod")]
public ActionResult<Dictionary<int, PairPeriodTime>> GetPairPeriod() => config.Value.ScheduleSettings!.PairPeriod.ConvertToDto();