From 1536262c7a429ecc0d57c8c719a9fc87d18305dd Mon Sep 17 00:00:00 2001 From: Baptiste Fotia Date: Mon, 29 Apr 2024 16:51:33 +0200 Subject: [PATCH] fix(controller): Preserve the id workspace 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 --- lib/Controller/WorkspaceController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Controller/WorkspaceController.php b/lib/Controller/WorkspaceController.php index fb582861c..210aa4e21 100644 --- a/lib/Controller/WorkspaceController.php +++ b/lib/Controller/WorkspaceController.php @@ -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']);