diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-13 12:09:46 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-13 12:44:48 +0100 |
commit | f52ba44edb1c84be67e854125c3b9409e13a314a (patch) | |
tree | 6edd3bc274a490c9dfd657e872c4aa650e37e22f /apps/files/appinfo | |
parent | 58599e0360c4a90b71f569214ac591092916622c (diff) | |
download | nextcloud-server-f52ba44edb1c84be67e854125c3b9409e13a314a.tar.gz nextcloud-server-f52ba44edb1c84be67e854125c3b9409e13a314a.zip |
Move storagestats endpoint to proper controller
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files/appinfo')
-rw-r--r-- | apps/files/appinfo/routes.php | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/apps/files/appinfo/routes.php b/apps/files/appinfo/routes.php index 28bc60a31a3..3912d723508 100644 --- a/apps/files/appinfo/routes.php +++ b/apps/files/appinfo/routes.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** * @copyright Copyright (c) 2016, ownCloud, Inc. * @@ -31,35 +32,35 @@ namespace OCA\Files\AppInfo; $application = new Application(); $application->registerRoutes( $this, - array( - 'routes' => array( - array( + [ + 'routes' => [ + [ 'name' => 'API#getThumbnail', 'url' => '/api/v1/thumbnail/{x}/{y}/{file}', 'verb' => 'GET', - 'requirements' => array('file' => '.+') - ), - array( + 'requirements' => ['file' => '.+'] + ], + [ 'name' => 'API#updateFileTags', 'url' => '/api/v1/files/{path}', 'verb' => 'POST', - 'requirements' => array('path' => '.+'), - ), - array( + 'requirements' => ['path' => '.+'], + ], + [ 'name' => 'API#getRecentFiles', 'url' => '/api/v1/recent/', 'verb' => 'GET' - ), - array( + ], + [ 'name' => 'API#updateFileSorting', 'url' => '/api/v1/sorting', 'verb' => 'POST' - ), - array( + ], + [ 'name' => 'API#showHiddenFiles', 'url' => '/api/v1/showhidden', 'verb' => 'POST' - ), + ], [ 'name' => 'view#index', 'url' => '/', @@ -69,21 +70,24 @@ $application->registerRoutes( 'name' => 'settings#setMaxUploadSize', 'url' => '/settings/maxUpload', 'verb' => 'POST', - ] - ) - ) + ], + [ + 'name' => 'ajax#getStorageStats', + 'url' => '/ajax/getstoragestats.php', + 'verb' => 'GET', + ], + ] + ] ); /** @var $this \OC\Route\Router */ $this->create('files_ajax_download', 'ajax/download.php') ->actionInclude('files/ajax/download.php'); -$this->create('files_ajax_getstoragestats', 'ajax/getstoragestats.php') - ->actionInclude('files/ajax/getstoragestats.php'); $this->create('files_ajax_list', 'ajax/list.php') ->actionInclude('files/ajax/list.php'); $this->create('download', 'download{file}') - ->requirements(array('file' => '.*')) + ->requirements(['file' => '.*']) ->actionInclude('files/download.php'); |