Skip to content

Commit

Permalink
fix(controller): Preserve the id workspace
Browse files Browse the repository at this point in the history
With array_merge, the id groupfolders erased the id workspace.
It's fixed by reversing the values in the array_merge function.

Signed-off-by: Baptiste Fotia <[email protected]>
  • Loading branch information
zak39 committed Apr 29, 2024
1 parent d76c9ac commit 1536262
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Controller/WorkspaceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ public function findAll(): JSONResponse {
$spaces = [];
foreach ($workspaces as $workspace) {
$space = array_merge(
$workspace,
$this->folderHelper->getFolder(
$workspace['groupfolder_id'],
$this->rootFolder->getRootFolderStorageId()
)
),
$workspace
);

$gids = array_keys($space['groups']);
Expand Down

0 comments on commit 1536262

Please sign in to comment.