redesign user data api

This commit is contained in:
isUnknown 2024-10-28 15:33:52 +01:00
parent f132049948
commit 44361e614d
17 changed files with 80 additions and 52 deletions

View file

@ -78,9 +78,12 @@ $specificData = [
"exampleHardData" => 'Example hard value'
];
$data = array_merge($genericData, $specificData);
$pageData = array_merge($genericData, $specificData);
echo json_encode($data);
echo json_encode([
"page" => $pageData,
"user" => $userData
]);
```
`$genericData` are defined in the `/public/site/controllers/site.php` controllers. By default, it contains a simple representation of the page object.