send empty array on OccController->list()

This commit is contained in:
Alexander Rose
2023-08-13 23:09:32 +02:00
committed by Adphi
parent e62276b8a9
commit 2a25ca725e
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -5,7 +5,7 @@
<name>OCC Web</name> <name>OCC Web</name>
<summary>OCC Commands in a web terminal</summary> <summary>OCC Commands in a web terminal</summary>
<description><![CDATA[Run OCC Commands in a web terminal]]></description> <description><![CDATA[Run OCC Commands in a web terminal]]></description>
<version>0.1.0</version> <version>0.1.1</version>
<licence>agpl</licence> <licence>agpl</licence>
<author mail="adphi.apps@gmail.com" >Adphi</author> <author mail="adphi.apps@gmail.com" >Adphi</author>
<namespace>OCCWeb</namespace> <namespace>OCCWeb</namespace>
@@ -15,7 +15,7 @@
<repository>https://github.com/adphi/occweb</repository> <repository>https://github.com/adphi/occweb</repository>
<screenshot>https://github.com/adphi/occweb/raw/master/appinfo/screenshot.png</screenshot> <screenshot>https://github.com/adphi/occweb/raw/master/appinfo/screenshot.png</screenshot>
<dependencies> <dependencies>
<nextcloud min-version="19" max-version="23"/> <nextcloud min-version="19" max-version="27"/>
</dependencies> </dependencies>
<navigations> <navigations>
<navigation role="admin"> <navigation role="admin">
+1 -1
View File
@@ -11,6 +11,6 @@ return [
'routes' => [ 'routes' => [
['name' => 'occ#index', 'url' => '/', 'verb' => 'GET'], ['name' => 'occ#index', 'url' => '/', 'verb' => 'GET'],
['name' => 'occ#cmd', 'url' => '/cmd', 'verb' => 'POST'], ['name' => 'occ#cmd', 'url' => '/cmd', 'verb' => 'POST'],
['name' => 'occ#list', 'url' => '/cmd', 'verb' => 'GET'], ['name' => 'occ#list', 'url' => '/cmd', 'verb' => 'GET'],
] ]
]; ];
+4 -4
View File
@@ -78,11 +78,11 @@ class OccController extends Controller
} }
public function list() { public function list() {
$defs = $this->application->application->all(); // $defs = $this->application->application->all();
$cmds = array(); $cmds = array();
foreach ($defs as $d) { // foreach ($defs as $d) {
array_push($cmds, $d->getName()); // array_push($cmds, $d->getName());
} // }
return new DataResponse($cmds); return new DataResponse($cmds);
} }
} }