From f52ba44edb1c84be67e854125c3b9409e13a314a Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 13 Mar 2018 12:09:46 +0100 Subject: Move storagestats endpoint to proper controller Signed-off-by: Roeland Jago Douma --- apps/files/appinfo/routes.php | 44 +++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) (limited to 'apps/files/appinfo') 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 @@ 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'); -- cgit v1.2.3