Nextcloud-App/appinfo/routes.php

34 lines
929 B
PHP

<?php
declare(strict_types=1);
// SPDX-FileCopyrightText: BVSC e.V. <no@example.com>
// SPDX-License-Identifier: AGPL-3.0-or-later
/**
* Create your routes in here. The name is the lowercase name of the controller
* without the controller part, the stuff after the hash is the method.
* e.g. page#index -> OCA\UPschooling\Controller\PageController->index()
*
* The controller class has to be registered in the application.php file since
* it's instantiated in there
*/
return [
'resources' => [
// 'ticket' => ['url' => '/tickets'],
'ticket_api' => ['url' => '/api/v1/tickets']
],
'routes' => [
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
[
'name' => 'ticket_api#preflighted_cors',
'url' => '/api/v1/{path}',
'verb' => 'OPTIONS',
'requirements' => ['path' => '.+'],
],
[
'name' => 'ticket_api#fetch_chat',
'url' => '/api/v1/tickets/{id}/chat',
'verb' => 'GET',
],
],
];