Merge pull request #1518 from pixelfed/frontend-ui-refactor

Update CollectionController
This commit is contained in:
daniel 2019-07-17 23:28:42 -06:00 committed by GitHub
commit 4230a5a6d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -79,6 +79,9 @@ class CollectionController extends Controller
]);
$profile = Auth::user()->profile;
$collection = Collection::whereProfileId($profile->id)->findOrFail($id);
if($collection->items()->count() == 0) {
abort(404);
}
$collection->title = e($request->input('title'));
$collection->description = e($request->input('description'));
$collection->visibility = e($request->input('visibility'));