選択できるのは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. }