1
0
Fork 0
mirror of synced 2024-06-02 02:44:47 +12:00

Fix Tests

This commit is contained in:
Bradley Schofield 2021-12-07 10:42:33 +00:00
parent 7ac13b853c
commit 885f57438d
3 changed files with 5 additions and 2 deletions

View file

@ -274,7 +274,8 @@ App::put('/v1/functions/:functionId')
->inject('response')
->inject('dbForInternal')
->inject('project')
->action(function ($functionId, $name, $execute, $vars, $events, $schedule, $timeout, $response, $dbForInternal, $project) {
->inject('user')
->action(function ($functionId, $name, $execute, $vars, $events, $schedule, $timeout, $response, $dbForInternal, $project, $user) {
/** @var Appwrite\Utopia\Response $response */
/** @var Utopia\Database\Database $dbForInternal */
/** @var Utopia\Database\Document $project */
@ -306,6 +307,7 @@ App::put('/v1/functions/:functionId')
'projectId' => $project->getId(),
'webhooks' => $project->getAttribute('webhooks', []),
'functionId' => $function->getId(),
'userId' => $user->getId(),
'executionId' => null,
'trigger' => 'schedule',
]); // Async task rescheduale

View file

@ -211,7 +211,7 @@ App::post('/v1/cleanup/tag')
App::post('/v1/tag')
->param('functionId', '', new UID(), 'Function unique ID.')
->param('tagId', '', new UID(), 'Tag unique ID.')
->param('userId', '', new UID(), 'User unique ID.')
->param('userId', '', new UID(), 'User unique ID.', true)
->inject('response')
->inject('dbForInternal')
->inject('projectID')

View file

@ -199,6 +199,7 @@ class FunctionsV1 extends Worker
'projectId' => $projectId,
'webhooks' => $webhooks,
'functionId' => $function->getId(),
'userId' => $userId,
'executionId' => null,
'trigger' => 'schedule',
'scheduleOriginal' => $function->getAttribute('schedule', ''),