mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 06:08:46 -04:00
fix: Expose task type on CoreTaskProcessingTask json
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
3593d9b631
commit
9a2cd6b914
2 changed files with 3 additions and 1 deletions
|
|
@ -194,6 +194,7 @@ namespace OCA\Core;
|
|||
*
|
||||
* @psalm-type CoreTaskProcessingTask = array{
|
||||
* id: ?int,
|
||||
* type: string,
|
||||
* status: 0|1|2|3|4|5,
|
||||
* userId: ?string,
|
||||
* appId: string,
|
||||
|
|
|
|||
|
|
@ -193,12 +193,13 @@ final class Task implements \JsonSerializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* @psalm-return array{id: ?int, status: self::STATUS_*, userId: ?string, appId: string, input: ?array<array-key, mixed>, output: ?array<array-key, mixed>, identifier: ?string, completionExpectedAt: ?int, progress: ?float}
|
||||
* @psalm-return array{id: ?int, type: string, status: self::STATUS_*, userId: ?string, appId: string, input: ?array<array-key, mixed>, output: ?array<array-key, mixed>, identifier: ?string, completionExpectedAt: ?int, progress: ?float}
|
||||
* @since 30.0.0
|
||||
*/
|
||||
public function jsonSerialize(): array {
|
||||
return [
|
||||
'id' => $this->getId(),
|
||||
'type' => $this->getTaskTypeId(),
|
||||
'status' => $this->getStatus(),
|
||||
'userId' => $this->getUserId(),
|
||||
'appId' => $this->getAppId(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue