From ef3f60e180100a52779c7749151cab1e723e5914 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 21 May 2023 20:06:01 -0400 Subject: [PATCH] Add command to default actions --- app/frontend/templates/panel/server_schedule_edit.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/frontend/templates/panel/server_schedule_edit.html b/app/frontend/templates/panel/server_schedule_edit.html index 94e2d948..c85c4c35 100644 --- a/app/frontend/templates/panel/server_schedule_edit.html +++ b/app/frontend/templates/panel/server_schedule_edit.html @@ -273,6 +273,9 @@ if ($("#difficulty").val() == "reaction"){ formDataObject.interval_type = "reaction"; } + if ($("action").val() != "command"){ + formDataObject.command = formDataObject.action + "_server"; + } if (formDataObject.cron_string != ""){ formDataObject.interval_type = ''; } @@ -280,8 +283,6 @@ // Format the plain form data as JSON let formDataJsonString = JSON.stringify(formDataObject, replacer); - console.log(formDataJsonString); - let res = await fetch(`/api/v2/servers/${serverId}/tasks/`, { method: 'POST', headers: { @@ -317,6 +318,9 @@ if ($("#difficulty").val() == "reaction"){ formDataObject.interval_type = "reaction"; } + if ($("#action").val() != "command"){ + formDataObject.command = formDataObject.action + "_server"; + } if (formDataObject.cron_string != ""){ formDataObject.interval_type = ''; }