mirror of https://github.com/nextcloud/contacts
use postfix option for routes to prevent having duplicate view controller methods
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
parent
4bd0f4b317
commit
b7b80da8c6
|
@ -24,7 +24,7 @@
|
|||
return [
|
||||
'routes' => [
|
||||
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
|
||||
['name' => 'page#indexGroup', 'url' => '/{group}', 'verb' => 'GET'],
|
||||
['name' => 'page#indexContact', 'url' => '/{group}/{contact}', 'verb' => 'GET']
|
||||
['name' => 'page#index', 'url' => '/{group}', 'verb' => 'GET', 'postfix' => 'group'],
|
||||
['name' => 'page#index', 'url' => '/{group}/{contact}', 'verb' => 'GET', 'postfix' => 'group.contact']
|
||||
]
|
||||
];
|
||||
|
|
|
@ -50,24 +50,4 @@ class PageController extends Controller {
|
|||
return new TemplateResponse('contacts', 'main', $params); // templates/main.php
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* Default routing for groups
|
||||
*/
|
||||
public function indexGroup(): TemplateResponse {
|
||||
return $this->index();
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* Default routing for contacts
|
||||
*/
|
||||
public function indexContact(): TemplateResponse {
|
||||
return $this->index();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue