Upgrade to 4.2.0
This commit is contained in:
@@ -4,9 +4,8 @@
|
||||
/**
|
||||
* Page Routes
|
||||
*/
|
||||
|
||||
|
||||
return [
|
||||
// @codeCoverageIgnoreStart
|
||||
[
|
||||
'pattern' => 'pages/(:any)',
|
||||
'method' => 'GET',
|
||||
@@ -101,6 +100,15 @@ return [
|
||||
return $this->page($id)->changeTitle($this->requestBody('title'));
|
||||
}
|
||||
],
|
||||
[
|
||||
'pattern' => 'pages/(:any)/fields/(:any)/(:all?)',
|
||||
'method' => 'ALL',
|
||||
'action' => function (string $id, string $fieldName, string|null $path = null) {
|
||||
if ($page = $this->page($id)) {
|
||||
return $this->fieldApi($page, $fieldName, $path);
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
'pattern' => 'pages/(:any)/sections/(:any)',
|
||||
'method' => 'GET',
|
||||
@@ -109,12 +117,13 @@ return [
|
||||
}
|
||||
],
|
||||
[
|
||||
'pattern' => 'pages/(:any)/fields/(:any)/(:all?)',
|
||||
'pattern' => 'pages/(:any)/sections/(:any)/(:all?)',
|
||||
'method' => 'ALL',
|
||||
'action' => function (string $id, string $fieldName, string $path = null) {
|
||||
'action' => function (string $id, string $sectionName, string|null $path = null) {
|
||||
if ($page = $this->page($id)) {
|
||||
return $this->fieldApi($page, $fieldName, $path);
|
||||
return $this->sectionApi($page, $sectionName, $path);
|
||||
}
|
||||
}
|
||||
],
|
||||
// @codeCoverageIgnoreEnd
|
||||
];
|
||||
|
Reference in New Issue
Block a user