Skip to content

Commit 419c3dc

Browse files
authored
Merge pull request #67 from LaswitchTech/dev
General: Version bumped to v0.0.67
2 parents fd2d4fb + 0890c1c commit 419c3dc

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.0.66
1+
v0.0.67

src/API.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,12 @@ public function start(): self
150150
$results = $object->{$method}();
151151

152152
// Check if the results is an array
153-
if(is_array($results) && is_array($results['data'])){
153+
if(is_array($results) && !empty($results['data'])){
154+
155+
// Ensure data is an array
156+
if(!is_array($results['data'])){
157+
$results['data'] = [$results['data']];
158+
}
154159

155160
// Append the list of extensions(plugins) to the results
156161
$results['data']['extensions'] = array_values(array_diff(scandir($this->Config->root() . "/lib/plugins"), ['..', '.','.DS_Store']));
@@ -159,8 +164,13 @@ public function start(): self
159164
$results['data']['auth'] = [
160165
'authenticated' => $this->Auth->isAuthenticated(),
161166
'public' => $this->Config->get('application','public'),
167+
];
168+
169+
// Append Auth Information to the results
170+
$results['data']['app'] = [
162171
'maintenance' => $this->Config->get('application','maintenance'),
163172
'development' => $this->Config->get('application','development'),
173+
'logLevel' => $this->Config->get('log','level'),
164174
];
165175

166176
// Append Auth User Information to the results

0 commit comments

Comments
 (0)