redesign user data api
This commit is contained in:
parent
f132049948
commit
44361e614d
17 changed files with 80 additions and 52 deletions
|
|
@ -1,19 +1,2 @@
|
|||
<script>
|
||||
<?php if ($kirby->user()): ?>
|
||||
const kirbyData = {
|
||||
user: {
|
||||
role: '<?= $kirby->user()->role() ?>',
|
||||
uuid: '<?= $kirby->user()->uuid() ?>',
|
||||
notifications: <?= json_encode(Yaml::decode($kirby->user()->notifications()->value())) ?>
|
||||
<?php if ($kirby->user()->role() == 'client'): ?>
|
||||
client: {
|
||||
name: '<?= $kirby->user()->client()->toPage()->title() ?>',
|
||||
uuid: '<?= $kirby->user()->client()->toPage()->uuid() ?>',
|
||||
}
|
||||
<?php endif ?>
|
||||
}
|
||||
}
|
||||
<?php endif ?>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue