Skip to content

Commit

Permalink
fix: fix documents not displayed on Storage page (#2094)
Browse files Browse the repository at this point in the history
  • Loading branch information
djaiss authored Nov 25, 2018
1 parent 5d57a03 commit f972be3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
UNRELEASED CHANGES:

* Fix Storage page not being displayed
* Add ability to create tasks that are not linked to any contacts
* Fix avatar display in searches

Expand Down
6 changes: 3 additions & 3 deletions app/Http/Controllers/Settings/StorageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class StorageController extends Controller
*/
public function index()
{
$documents = Document::with(['contact' => function ($query) {
$query->where('account_id', auth()->user()->account->id);
}])->orderBy('created_at', 'desc')->get();
$documents = Document::where('account_id', auth()->user()->account->id)
->orderBy('created_at', 'desc')
->get();

// count total account size
// size is in bytes in the database
Expand Down

0 comments on commit f972be3

Please sign in to comment.