您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

ScheduleController.cs 608B

123456789101112131415161718192021
  1. namespace Diligent.WebAPI.Host.Controllers.V1
  2. {
  3. [ApiVersion("1.0")]
  4. [Route("v{version:apiVersion}/schedule")]
  5. [ApiController]
  6. public class ScheduleController:ControllerBase
  7. {
  8. private readonly IScheduleService _scheduleService;
  9. public ScheduleController(IScheduleService scheduleService)
  10. {
  11. _scheduleService = scheduleService;
  12. }
  13. [Authorize]
  14. [HttpGet]
  15. public async Task<IActionResult> GetSchedule(int month,int year) =>
  16. Ok(await _scheduleService.GetScheduleForCertainPeriod(month, year));
  17. }
  18. }