Skip to content

Commit ef35b71

Browse files
authored
fix: TaskProcessingAPI - unregister provider endpoint (nextcloud#370)
Found this when writing a small test for **nc_py_api** without this change `$taskProcessingProvider->id` are always `null` ```php $taskProcessingProvider = $this->getExAppTaskProcessingProvider($appId, $name); if ($taskProcessingProvider !== null) { $this->mapper->delete($taskProcessingProvider); $this->resetCacheEnabled(); return $taskProcessingProvider; } ``` Signed-off-by: Alexander Piskun <[email protected]>
1 parent e82a315 commit ef35b71

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Db/TaskProcessing/TaskProcessingProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ public function __construct(array $params = []) {
4141
$this->addType('provider', 'string');
4242
$this->addType('custom_task_type', 'string');
4343

44+
if (isset($params['id'])) {
45+
$this->setId($params['id']);
46+
}
4447
if (isset($params['app_id'])) {
4548
$this->setAppId($params['app_id']);
4649
}
@@ -63,6 +66,7 @@ public function __construct(array $params = []) {
6366

6467
public function jsonSerialize(): array {
6568
return [
69+
'id' => $this->id,
6670
'app_id' => $this->appId,
6771
'name' => $this->name,
6872
'display_name' => $this->displayName,

0 commit comments

Comments
 (0)