send empty array on OccController->list()
This commit is contained in:
+2
-2
@@ -5,7 +5,7 @@
|
||||
<name>OCC Web</name>
|
||||
<summary>OCC Commands in a web terminal</summary>
|
||||
<description><![CDATA[Run OCC Commands in a web terminal]]></description>
|
||||
<version>0.1.0</version>
|
||||
<version>0.1.1</version>
|
||||
<licence>agpl</licence>
|
||||
<author mail="adphi.apps@gmail.com" >Adphi</author>
|
||||
<namespace>OCCWeb</namespace>
|
||||
@@ -15,7 +15,7 @@
|
||||
<repository>https://github.com/adphi/occweb</repository>
|
||||
<screenshot>https://github.com/adphi/occweb/raw/master/appinfo/screenshot.png</screenshot>
|
||||
<dependencies>
|
||||
<nextcloud min-version="19" max-version="23"/>
|
||||
<nextcloud min-version="19" max-version="27"/>
|
||||
</dependencies>
|
||||
<navigations>
|
||||
<navigation role="admin">
|
||||
|
||||
+1
-1
@@ -11,6 +11,6 @@ return [
|
||||
'routes' => [
|
||||
['name' => 'occ#index', 'url' => '/', 'verb' => 'GET'],
|
||||
['name' => 'occ#cmd', 'url' => '/cmd', 'verb' => 'POST'],
|
||||
['name' => 'occ#list', 'url' => '/cmd', 'verb' => 'GET'],
|
||||
['name' => 'occ#list', 'url' => '/cmd', 'verb' => 'GET'],
|
||||
]
|
||||
];
|
||||
|
||||
@@ -78,11 +78,11 @@ class OccController extends Controller
|
||||
}
|
||||
|
||||
public function list() {
|
||||
$defs = $this->application->application->all();
|
||||
// $defs = $this->application->application->all();
|
||||
$cmds = array();
|
||||
foreach ($defs as $d) {
|
||||
array_push($cmds, $d->getName());
|
||||
}
|
||||
// foreach ($defs as $d) {
|
||||
// array_push($cmds, $d->getName());
|
||||
// }
|
||||
return new DataResponse($cmds);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user