Skip to content

Commit

Permalink
CS
Browse files Browse the repository at this point in the history
  • Loading branch information
dergel committed Jan 5, 2024
1 parent d6b7c20 commit da70738
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions plugins/rest/lib/rest/route.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public function __construct(array $config)
$this->type = $config['type'];
$this->table = $this->config['table'];
$this->query = $this->config['query'];
$this->preFunc = $this->config['preFunc'] ?? null;
$this->postFunc = $this->config['postFunc'] ?? null;
$this->getItemFunc = $this->config['getItemFunc'] ?? null;
$this->preFunc = $config['preFunc'] ?? null;
$this->postFunc = $config['postFunc'] ?? null;
$this->getItemFunc = $config['getItemFunc'] ?? null;
$this->instance = $this->table->createDataset();
$this->path = ('/' == mb_substr($this->config['path'], -1)) ? mb_substr($this->config['path'], 0, -1) : $this->config['path'];
}
Expand Down Expand Up @@ -221,6 +221,7 @@ public function handleRequest(array $paths, array $get)
$data = [];
if ($instances) {
foreach ($instances as $instance) {

$instance_data = $this->getInstanceData(
$instance,
array_merge($paths, [$instance->getId()])
Expand Down Expand Up @@ -301,7 +302,7 @@ public function handleRequest(array $paths, array $get)

break;

// ----- /END GET
// ----- /END GET

case 'post':
$instance = $table->createDataset();
Expand Down

0 comments on commit da70738

Please sign in to comment.