resolve conflict

This commit is contained in:
isUnknown 2024-10-08 17:30:56 +02:00
parent fa34aed357
commit d4fe38e65a
16 changed files with 92 additions and 19 deletions

View 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);
}
];