summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/includes
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2020-03-05 13:52:08 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-06-02 12:32:36 +0200
commit04a41625981b3982ec66c31ddb291ff4f91b65d1 (patch)
tree915d20c273b2890ca31d168c70eae1a6a0561026 /admin/WebConsole/includes
parent639a33c7c11888cb33ee9c850aa158f6a21eff87 (diff)
#942 Adapt web to use /schedule get on /schedule/create (web)
Diffstat (limited to 'admin/WebConsole/includes')
-rw-r--r--admin/WebConsole/includes/restfunctions.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php
index b6729345..a748ef9a 100644
--- a/admin/WebConsole/includes/restfunctions.php
+++ b/admin/WebConsole/includes/restfunctions.php
@@ -30,6 +30,7 @@ define('OG_REST_CMD_RUN_TASK', 'task/run');
define('OG_REST_CMD_CREATE_SCHEDULE', 'schedule/create');
define('OG_REST_CMD_DELETE_SCHEDULE', 'schedule/delete');
define('OG_REST_CMD_UPDATE_SCHEDULE', 'schedule/update');
+define('OG_REST_CMD_SCHEDULE', 'schedule');
define('OG_REST_PARAM_CLIENTS', 'clients');
define('OG_REST_PARAM_ADDR', 'addr');
@@ -618,6 +619,16 @@ function update_schedule($schedule_id, $task_id, $name, $years, $months, $days,
return common_request(OG_REST_CMD_UPDATE_SCHEDULE, POST, $data);
}
+function get_schedule($task_id = null) {
+ if (isset($task_id))
+ $data = array(OG_REST_PARAM_TASK => strval($task_id));
+ else
+ $data = null;
+
+ $result = common_request(OG_REST_CMD_SCHEDULE, POST, $data);
+ return $result;
+}
+
/*
* @function multiRequest.
* @param URLs array (may include header and POST data), cURL options array.