backend update

This commit is contained in:
carodej
2020-06-09 18:06:04 +02:00
parent 0b7bc27a5f
commit 95bc310def
48 changed files with 1013 additions and 657 deletions

View File

@@ -33,6 +33,9 @@ class UserResource extends JsonResource
]
],
'relationships' => [
'subscription' => $this->activeSubscriptions()->count() !== 0
? new UserSubscription($this->subscription('main'))
: null,
'settings' => [
'data' => [
'id' => (string)$this->settings->id,
@@ -55,7 +58,24 @@ class UserResource extends JsonResource
'attributes' => $this->storage
]
],
'subscription' => $this->activeSubscriptions()->count() !== 0 ? new UserSubscription($this->subscription('main')) : null,
'favourites' => [
'data' => [
'id' => '1',
'type' => 'folders_favourite',
'attributes' => [
'folders' => $this->favourite_folders->makeHidden(['pivot'])
],
],
],
'tree' => [
'data' => [
'id' => '1',
'type' => 'folders_tree',
'attributes' => [
'folders' => $this->folder_tree
],
],
],
]
];
}