diff --git a/app/config/collections.php b/app/config/collections.php index 07b2d22811..23d95af718 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -1391,8 +1391,8 @@ $collections = [ ], [ '$collection' => Database::SYSTEM_COLLECTION_RULES, - 'label' => 'Previous', - 'key' => 'previous', + 'label' => 'Schedule Previous Run', + 'key' => 'schedulePrevious', 'type' => Database::SYSTEM_VAR_TYPE_NUMERIC, 'default' => '', 'required' => false, @@ -1400,8 +1400,8 @@ $collections = [ ], [ '$collection' => Database::SYSTEM_COLLECTION_RULES, - 'label' => 'Next', - 'key' => 'next', + 'label' => 'Schedule Next Run', + 'key' => 'scheduleNext', 'type' => Database::SYSTEM_VAR_TYPE_NUMERIC, 'default' => '', 'required' => false, diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index b1ed7eed61..5ba023983d 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -51,8 +51,8 @@ App::post('/v1/functions') 'vars' => $vars, 'events' => $events, 'schedule' => $schedule, - 'previous' => null, - 'next' => null, + 'schedulePrevious' => null, + 'scheduleNext' => null, 'timeout' => $timeout, ]); @@ -257,8 +257,8 @@ App::put('/v1/functions/:functionId') 'vars' => $vars, 'events' => $events, 'schedule' => $schedule, - 'previous' => null, - 'next' => $next, + 'schedulePrevious' => null, + 'scheduleNext' => $next, 'timeout' => $timeout, ])); @@ -297,7 +297,7 @@ App::patch('/v1/functions/:functionId/tag') $function = $projectDB->updateDocument(array_merge($function->getArrayCopy(), [ 'tag' => $tag->getId(), - 'next' => $next, + 'scheduleNext' => $next, ])); if (false === $function) { diff --git a/src/Appwrite/Utopia/Response/Model/Func.php b/src/Appwrite/Utopia/Response/Model/Func.php index 7536082261..e0d3595355 100644 --- a/src/Appwrite/Utopia/Response/Model/Func.php +++ b/src/Appwrite/Utopia/Response/Model/Func.php @@ -65,13 +65,13 @@ class Func extends Model 'default' => '', 'example' => '5 4 * * *', ]) - ->addRule('next', [ + ->addRule('scheduleNext', [ 'type' => 'integer', 'description' => 'Function next scheduled execution date in Unix timestamp.', 'example' => 1592981292, 'default' => 0, ]) - ->addRule('previous', [ + ->addRule('schedulePrevious', [ 'type' => 'integer', 'description' => 'Function next scheduled execution date in Unix timestamp.', 'example' => 1592981237,