fix: move from body to query
This commit is contained in:
		| @@ -46,7 +46,7 @@ public class ScheduleController(ILogger<ScheduleController> logger, IOptionsSnap | ||||
|     /// <returns>Cron expression and the list of next scheduled task dates.</returns> | ||||
|     /// <exception cref="ControllerArgumentException">Thrown if the provided cron expression is invalid.</exception> | ||||
|     [HttpPost("CronUpdateSchedule")] | ||||
|     public ActionResult<CronUpdateScheduleResponse> CronUpdateSchedule([FromBody] string cron) | ||||
|     public ActionResult<CronUpdateScheduleResponse> CronUpdateSchedule([FromQuery] string cron) | ||||
|     { | ||||
|         cron = cron.Trim(); | ||||
|         if (!CronExpression.TryParse(cron, CronFormat.Standard, out _)) | ||||
| @@ -77,7 +77,7 @@ public class ScheduleController(ILogger<ScheduleController> logger, IOptionsSnap | ||||
|     /// <returns>Success or failure.</returns> | ||||
|     /// <exception cref="ControllerArgumentException">Thrown if the start term date is more than 6 months in the past or future.</exception> | ||||
|     [HttpPost("StartTerm")] | ||||
|     public ActionResult StartTerm([FromBody] DateOnly startTerm, [FromQuery] bool force = false) | ||||
|     public ActionResult StartTerm([FromQuery] DateOnly startTerm, [FromQuery] bool force = false) | ||||
|     { | ||||
|         var differentByTime = DateTime.Now - startTerm.ToDateTime(new TimeOnly(0, 0, 0)); | ||||
|         if (differentByTime > TimeSpan.FromDays(190) || differentByTime.Multiply(-1) > TimeSpan.FromDays(190)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user