Files
lichterei-web/kirby/config/api/routes/roles.php
Bastian Allgeier 447a9dd266 Upgrade to 3.2.5
2019-09-24 11:00:59 +02:00

29 lines
677 B
PHP
Executable File

<?php
/**
* Roles Routes
*/
return [
[
'pattern' => 'roles',
'method' => 'GET',
'action' => function () {
switch (get('canBe')) {
case 'changed':
return $this->kirby()->roles()->canBeChanged();
case 'created':
return $this->kirby()->roles()->canBeCreated();
default:
return $this->kirby()->roles();
}
}
],
[
'pattern' => 'roles/(:any)',
'method' => 'GET',
'action' => function (string $name) {
return $this->kirby()->roles()->find($name);
}
]
];