mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Add command to default actions
This commit is contained in:
parent
cbfa40ce8d
commit
ef3f60e180
@ -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 = '';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user