update kirby to v5 and add refresh cache panel view button
This commit is contained in:
commit
9a86d41254
466 changed files with 19960 additions and 10497 deletions
37
public/kirby/config/api/routes/changes.php
Normal file
37
public/kirby/config/api/routes/changes.php
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Api\Controller\Changes;
|
||||
use Kirby\Cms\App;
|
||||
use Kirby\Cms\Find;
|
||||
|
||||
return [
|
||||
[
|
||||
'pattern' => '(:all)/changes/discard',
|
||||
'method' => 'POST',
|
||||
'action' => function (string $path) {
|
||||
return Changes::discard(
|
||||
model: Find::parent($path),
|
||||
);
|
||||
}
|
||||
],
|
||||
[
|
||||
'pattern' => '(:all)/changes/publish',
|
||||
'method' => 'POST',
|
||||
'action' => function (string $path) {
|
||||
return Changes::publish(
|
||||
model: Find::parent($path),
|
||||
input: App::instance()->request()->get()
|
||||
);
|
||||
}
|
||||
],
|
||||
[
|
||||
'pattern' => '(:all)/changes/save',
|
||||
'method' => 'POST',
|
||||
'action' => function (string $path) {
|
||||
return Changes::save(
|
||||
model: Find::parent($path),
|
||||
input: App::instance()->request()->get()
|
||||
);
|
||||
}
|
||||
],
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue