diff options
author | Marcel Klehr <mklehr@gmx.net> | 2024-05-06 09:21:09 +0200 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2024-05-14 11:38:40 +0200 |
commit | 9a2cd6b914fbd2c4e3234aaf030cc09270863c7f (patch) | |
tree | 1a154c68ad86c1d8a8c3d8ef8575fb445318f2eb | |
parent | 3593d9b631e42e987554af299cb511a4262c1d36 (diff) | |
download | nextcloud-server-9a2cd6b914fbd2c4e3234aaf030cc09270863c7f.tar.gz nextcloud-server-9a2cd6b914fbd2c4e3234aaf030cc09270863c7f.zip |
fix: Expose task type on CoreTaskProcessingTask json
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
-rw-r--r-- | core/ResponseDefinitions.php | 1 | ||||
-rw-r--r-- | lib/public/TaskProcessing/Task.php | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/core/ResponseDefinitions.php b/core/ResponseDefinitions.php index ef577a61420..68474a6e535 100644 --- a/core/ResponseDefinitions.php +++ b/core/ResponseDefinitions.php @@ -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, diff --git a/lib/public/TaskProcessing/Task.php b/lib/public/TaskProcessing/Task.php index 4bddd06162f..eb4cbe345e1 100644 --- a/lib/public/TaskProcessing/Task.php +++ b/lib/public/TaskProcessing/Task.php @@ -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(), |