resolve conflict
This commit is contained in:
parent
fa34aed357
commit
d4fe38e65a
16 changed files with 92 additions and 19 deletions
22
public/site/config/routes/save-page.php
Normal file
22
public/site/config/routes/save-page.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'pattern' => '(:all)save-page.json',
|
||||
'method' => 'POST',
|
||||
'action' => function () {
|
||||
$json = file_get_contents('php://input');
|
||||
$data = json_decode($json);
|
||||
|
||||
$page = page($data->pageUri);
|
||||
|
||||
$newProperties = [];
|
||||
|
||||
foreach ($data->properties as $incomingProperty) {
|
||||
$newProperties[$incomingProperty->name] = $incomingProperty->value;
|
||||
}
|
||||
|
||||
$newPage = $page->update($newProperties);
|
||||
|
||||
return json_encode($newProperties);
|
||||
}
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue