forked from mirror/pixelfed
Update CollectionController
This commit is contained in:
parent
e01ece173c
commit
8e033b3228
1 changed files with 6 additions and 2 deletions
|
@ -34,7 +34,7 @@ class CollectionController extends Controller
|
|||
|
||||
public function show(Request $request, int $collection)
|
||||
{
|
||||
$collection = Collection::whereNotNull('published_at')->findOrFail($collection);
|
||||
$collection = Collection::with('profile')->whereNotNull('published_at')->findOrFail($collection);
|
||||
if($collection->profile->status != null) {
|
||||
abort(404);
|
||||
}
|
||||
|
@ -100,9 +100,13 @@ class CollectionController extends Controller
|
|||
$collection->items()->delete();
|
||||
$collection->delete();
|
||||
|
||||
if($request->wantsJson()) {
|
||||
return 200;
|
||||
}
|
||||
|
||||
return redirect('/');
|
||||
}
|
||||
|
||||
public function storeId(Request $request)
|
||||
{
|
||||
$this->validate($request, [
|
||||
|
|
Loading…
Reference in a new issue