nextcloud/apps/files/appinfo/routes.php

161 lines
4.0 KiB
PHP
Raw Normal View History

<?php
declare(strict_types=1);
/**
2016-07-21 17:49:16 +03:00
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
2015-03-26 13:44:34 +03:00
* @author Bart Visscher <bartv@thisnet.nl>
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Felix Nüsse <Felix.nuesse@t-online.de>
* @author fnuesse <felix.nuesse@t-online.de>
* @author fnuesse <fnuesse@techfak.uni-bielefeld.de>
* @author Joas Schilling <coding@schilljs.com>
* @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* @author Julius Härtl <jus@bitgrid.net>
2016-05-26 20:56:05 +03:00
* @author Lukas Reschke <lukas@statuscode.ch>
* @author Robin Appelman <robin@icewind.nl>
2016-07-21 17:49:16 +03:00
* @author Roeland Jago Douma <roeland@famdouma.nl>
2015-03-26 13:44:34 +03:00
* @author Tobias Kaminsky <tobias@kaminsky.me>
* @author Vincent Petry <pvince81@owncloud.com>
*
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
2015-03-26 13:44:34 +03:00
*
*/
namespace OCA\Files\AppInfo;
/** @var Application $application */
$application = \OC::$server->query(Application::class);
$application->registerRoutes(
$this,
[
'routes' => [
[
'name' => 'View#showFile',
'url' => '/f/{fileid}',
'verb' => 'GET',
'root' => '',
],
[
'name' => 'API#getThumbnail',
'url' => '/api/v1/thumbnail/{x}/{y}/{file}',
'verb' => 'GET',
'requirements' => ['file' => '.+']
],
[
'name' => 'API#updateFileTags',
'url' => '/api/v1/files/{path}',
'verb' => 'POST',
'requirements' => ['path' => '.+'],
],
[
2016-07-22 15:48:51 +03:00
'name' => 'API#getRecentFiles',
'url' => '/api/v1/recent/',
'verb' => 'GET'
],
[
2016-04-12 12:08:26 +03:00
'name' => 'API#updateFileSorting',
'url' => '/api/v1/sorting',
'verb' => 'POST'
],
[
'name' => 'API#showHiddenFiles',
'url' => '/api/v1/showhidden',
'verb' => 'POST'
],
[
'name' => 'API#showGridView',
'url' => '/api/v1/showgridview',
'verb' => 'POST'
],
[
'name' => 'API#getGridView',
'url' => '/api/v1/showgridview',
'verb' => 'GET'
],
[
'name' => 'view#index',
'url' => '/',
'verb' => 'GET',
],
[
'name' => 'ajax#getStorageStats',
'url' => '/ajax/getstoragestats.php',
'verb' => 'GET',
],
[
'name' => 'API#toggleShowFolder',
'url' => '/api/v1/toggleShowFolder/{key}',
'verb' => 'POST'
Removed old code Signed-off-by: fnuesse <felix.nuesse@t-online.de> Removed duplicate collapse-button and changed api-endpoints Signed-off-by: fnuesse <felix.nuesse@t-online.de> Removed app-navigation-caption from apps.scss Signed-off-by: fnuesse <felix.nuesse@t-online.de> Changed api-endpoints Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed Codestyle (.js) Signed-off-by: fnuesse <felix.nuesse@t-online.de> Hid away extended Settings Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed reverse state Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed Missing reverse after changing sort-strategy Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed Copyright-Header Signed-off-by: fnuesse <felix.nuesse@t-online.de> Removed UI-Flickering Signed-off-by: fnuesse <felix.nuesse@t-online.de> hid dotmenu on toggle while favorites are empty Signed-off-by: fnuesse <felix.nuesse@t-online.de> Added Draggable to listelements (WIP) Signed-off-by: fnuesse <felix.nuesse@t-online.de> Rebuild appnavigation.php with recursive function to allow easy implementation of sublists Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed draggable Sublist-Elements Signed-off-by: fnuesse <felix.nuesse@t-online.de> Fixed draggable Sublist-Elements Signed-off-by: fnuesse <felix.nuesse@t-online.de> Added date-modified sorting option to quickaccess Signed-off-by: fnuesse <felix.nuesse@t-online.de> Added custom order sorting option to quickaccess Signed-off-by: fnuesse <felix.nuesse@t-online.de> Added custom order sorting option to quickaccess Signed-off-by: fnuesse <felix.nuesse@t-online.de> Added fallback for custom ordering Signed-off-by: fnuesse <felix.nuesse@t-online.de>
2018-06-20 23:40:10 +03:00
],
[
'name' => 'API#getNodeType',
'url' => '/api/v1/quickaccess/get/NodeType',
'verb' => 'GET',
],
[
'name' => 'DirectEditingView#edit',
'url' => '/directEditing/{token}',
'verb' => 'GET'
],
],
'ocs' => [
[
'name' => 'DirectEditing#info',
'url' => '/api/v1/directEditing',
'verb' => 'GET'
],
[
'name' => 'DirectEditing#templates',
'url' => '/api/v1/directEditing/templates/{editorId}/{creatorId}',
'verb' => 'GET'
],
[
'name' => 'DirectEditing#open',
'url' => '/api/v1/directEditing/open',
'verb' => 'POST'
],
[
'name' => 'DirectEditing#create',
'url' => '/api/v1/directEditing/create',
'verb' => 'POST'
],
[
'name' => 'TransferOwnership#transfer',
'url' => '/api/v1/transferownership',
'verb' => 'POST',
],
[
'name' => 'TransferOwnership#accept',
'url' => '/api/v1/transferownership/{id}',
'verb' => 'POST',
],
[
'name' => 'TransferOwnership#reject',
'url' => '/api/v1/transferownership/{id}',
'verb' => 'DELETE',
],
],
]
);
/** @var $this \OC\Route\Router */
2014-08-19 17:19:18 +04:00
$this->create('files_ajax_download', 'apps/files/ajax/download.php')
2014-08-19 17:19:18 +04:00
->actionInclude('files/ajax/download.php');
$this->create('files_ajax_list', 'apps/files/ajax/list.php')
2014-08-19 17:19:18 +04:00
->actionInclude('files/ajax/list.php');