Move to home folder fix

This commit is contained in:
Peter Papp
2021-04-16 16:54:59 +02:00
parent 397b3228d0
commit 0910daa1a3
3 changed files with 13 additions and 42 deletions

View File

@@ -333,17 +333,13 @@ class FileManagerService
if ($item['type'] === 'folder') {
Folder::find($item['id'])
->update([
'parent_id' => $to_id
]);
->update(['parent_id' => $to_id]);
}
// Move file
if ($item['type'] !== 'folder') {
UserFile::find($item['id'])
->update([
'folder_id' => $to_id
]);
->update(['folder_id' => $to_id]);
}
}
}