mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
chore: simplify action constructor
This commit is contained in:
parent
04b6f62ac2
commit
ba22e5f457
6 changed files with 6 additions and 6 deletions
|
|
@ -67,7 +67,7 @@ class Create extends Action
|
|||
->inject('dbForProject')
|
||||
->inject('user')
|
||||
->inject('queueForEvents')
|
||||
->callback(fn ($bucketId, $fileId, $expire, $permissions, $response, $dbForProject, $user, $queueForEvents) => $this->action($bucketId, $fileId, $expire, $permissions, $response, $dbForProject, $user, $queueForEvents));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $bucketId, string $fileId, ?string $expire, ?array $permissions, Response $response, Database $dbForProject, Document $user, Event $queueForEvents)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class XList extends Action
|
|||
->param('queries', [], new FileTokens(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', FileTokens::ALLOWED_ATTRIBUTES), true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback(fn ($bucketId, $fileId, $queries, $response, $dbForProject) => $this->action($bucketId, $fileId, $queries, $response, $dbForProject));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $bucketId, string $fileId, array $queries, Response $response, Database $dbForProject)
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class Delete extends Action
|
|||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('queueForEvents')
|
||||
->callback(fn ($tokenId, $response, $dbForProject, $queueForEvents) => $this->action($tokenId, $response, $dbForProject, $queueForEvents));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $tokenId, Response $response, Database $dbForProject, Event $queueForEvents)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class Get extends Action
|
|||
->param('tokenId', '', new UID(), 'Token ID.')
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback(fn ($tokenId, $response, $dbForProject) => $this->action($tokenId, $response, $dbForProject));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $tokenId, Response $response, Database $dbForProject)
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class Get extends Action
|
|||
->param('tokenId', '', new UID(), 'File token ID.')
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback(fn ($tokenId, $response, $dbForProject) => $this->action($tokenId, $response, $dbForProject));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $tokenId, Response $response, Database $dbForProject)
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class Update extends Action
|
|||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('queueForEvents')
|
||||
->callback(fn ($tokenId, $expire, $permissions, $response, $dbForProject, $queueForEvents) => $this->action($tokenId, $expire, $permissions, $response, $dbForProject, $queueForEvents));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $tokenId, ?string $expire, ?array $permissions, Response $response, Database $dbForProject, Event $queueForEvents)
|
||||
|
|
|
|||
Loading…
Reference in a new issue