mirror of
https://github.com/Huber1/skigemeinschaft.git
synced 2026-05-13 12:27:34 +02:00
27 lines
465 B
PHP
27 lines
465 B
PHP
<?php
|
|
|
|
use Kirby\Cms\Find;
|
|
|
|
/**
|
|
* Roles Routes
|
|
*/
|
|
return [
|
|
[
|
|
'pattern' => 'roles',
|
|
'method' => 'GET',
|
|
'action' => function () {
|
|
return match ($this->requestQuery('canBe')) {
|
|
'changed' => Find::roles()->canBeChanged(),
|
|
'created' => Find::roles()->canBeCreated(),
|
|
default => Find::roles()
|
|
};
|
|
}
|
|
],
|
|
[
|
|
'pattern' => 'roles/(:any)',
|
|
'method' => 'GET',
|
|
'action' => function (string $name) {
|
|
return Find::role($name);
|
|
}
|
|
]
|
|
];
|