From 7d6b21c5bb61945c34c47302cb665daf8e83aff0 Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Sun, 2 Feb 2025 04:51:09 +0300 Subject: [PATCH] fix: move from body to query --- Endpoint/Controllers/V1/Configuration/ScheduleController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Endpoint/Controllers/V1/Configuration/ScheduleController.cs b/Endpoint/Controllers/V1/Configuration/ScheduleController.cs index 30397e1..1123a8a 100644 --- a/Endpoint/Controllers/V1/Configuration/ScheduleController.cs +++ b/Endpoint/Controllers/V1/Configuration/ScheduleController.cs @@ -46,7 +46,7 @@ public class ScheduleController(ILogger logger, IOptionsSnap /// Cron expression and the list of next scheduled task dates. /// Thrown if the provided cron expression is invalid. [HttpPost("CronUpdateSchedule")] - public ActionResult CronUpdateSchedule([FromBody] string cron) + public ActionResult CronUpdateSchedule([FromQuery] string cron) { cron = cron.Trim(); if (!CronExpression.TryParse(cron, CronFormat.Standard, out _)) @@ -77,7 +77,7 @@ public class ScheduleController(ILogger logger, IOptionsSnap /// Success or failure. /// Thrown if the start term date is more than 6 months in the past or future. [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))