Upgrade to 4.2.0

This commit is contained in:
Bastian Allgeier
2024-04-10 11:09:52 +02:00
parent 77d9337371
commit 7f4eb7509d
88 changed files with 1187 additions and 490 deletions

View File

@@ -8,7 +8,15 @@ $parentPattern = '(account|pages/[^/]+|site|users/[^/]+)/files';
* Files Routes
*/
return [
[
'pattern' => $filePattern . '/fields/(:any)/(:all?)',
'method' => 'ALL',
'action' => function (string $parent, string $filename, string $fieldName, string|null $path = null) {
if ($file = $this->file($parent, $filename)) {
return $this->fieldApi($file, $fieldName, $path);
}
}
],
[
'pattern' => $filePattern . '/sections/(:any)',
'method' => 'GET',
@@ -17,11 +25,11 @@ return [
}
],
[
'pattern' => $filePattern . '/fields/(:any)/(:all?)',
'pattern' => $filePattern . '/sections/(:any)/(:all?)',
'method' => 'ALL',
'action' => function (string $parent, string $filename, string $fieldName, string $path = null) {
'action' => function (string $parent, string $filename, string $sectionName, string|null $path = null) {
if ($file = $this->file($parent, $filename)) {
return $this->fieldApi($file, $fieldName, $path);
return $this->sectionApi($file, $sectionName, $path);
}
}
],