Changed function attribute names

This commit is contained in:
Eldad Fux 2020-09-24 09:44:10 +03:00
parent 10b61b6b9d
commit d52e98490b
3 changed files with 11 additions and 11 deletions

View file

@ -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,

View file

@ -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) {

View file

@ -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,