From 305676ca1666fc0f00dbb130a61eaa97899818ea Mon Sep 17 00:00:00 2001 From: kirinnee Date: Tue, 12 Dec 2023 19:26:26 +0800 Subject: [PATCH] fix: swagger parameter name match case from FromRoute attributes --- App/Modules/Schedules/API/V1/ScheduleController.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/App/Modules/Schedules/API/V1/ScheduleController.cs b/App/Modules/Schedules/API/V1/ScheduleController.cs index a1c6dd6..7277415 100644 --- a/App/Modules/Schedules/API/V1/ScheduleController.cs +++ b/App/Modules/Schedules/API/V1/ScheduleController.cs @@ -35,7 +35,7 @@ public async Task> Latest() new EntityNotFound("There has been no schedules", typeof(Schedule), "latest")); } - [HttpGet("range/{from}/{to}")] + [HttpGet("range/{From}/{To}")] public async Task>> Range([FromRoute] ScheduleRangeReq req) { var result = await scheduleRangeReqValidator @@ -45,7 +45,7 @@ public async Task>> Range([FromRo return this.ReturnResult(result); } - [HttpGet("{date}")] + [HttpGet("{Date}")] public async Task> Get([FromRoute] ScheduleDateReq req) { var result = await scheduleDateReqValidator @@ -55,7 +55,7 @@ public async Task> Get([FromRoute] ScheduleDa return this.ReturnResult(result); } - [Authorize(Policy = AuthPolicies.AdminOrScheduleSyncer), HttpPut("{date}")] + [Authorize(Policy = AuthPolicies.AdminOrScheduleSyncer), HttpPut("{Date}")] public async Task> Update([FromRoute] ScheduleDateReq dateReq, [FromBody] ScheduleRecordReq record) { @@ -76,7 +76,7 @@ public async Task BulkUpdate([FromBody] ScheduleBulkUpdateReq sche return this.ReturnUnitResult(result); } - [Authorize(Policy = AuthPolicies.OnlyAdmin), HttpDelete("{date}")] + [Authorize(Policy = AuthPolicies.OnlyAdmin), HttpDelete("{Date}")] public async Task Delete([FromRoute] ScheduleDateReq req) { var result = await scheduleDateReqValidator