Skip to content

Commit

Permalink
fix: TaskProcessingAPI - unregister provider endpoint (#370)
Browse files Browse the repository at this point in the history
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 <bigcat88@icloud.com>
  • Loading branch information
bigcat88 authored Aug 23, 2024
1 parent e82a315 commit ef35b71
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Db/TaskProcessing/TaskProcessingProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public function __construct(array $params = []) {
$this->addType('provider', 'string');
$this->addType('custom_task_type', 'string');

if (isset($params['id'])) {
$this->setId($params['id']);
}
if (isset($params['app_id'])) {
$this->setAppId($params['app_id']);
}
Expand All @@ -63,6 +66,7 @@ public function __construct(array $params = []) {

public function jsonSerialize(): array {
return [
'id' => $this->id,
'app_id' => $this->appId,
'name' => $this->name,
'display_name' => $this->displayName,
Expand Down

0 comments on commit ef35b71

Please sign in to comment.