forked from mirror/pixelfed
Update CollectionController, fix null bug
This commit is contained in:
parent
c568d54893
commit
a84ff19451
1 changed files with 3 additions and 3 deletions
|
@ -50,13 +50,13 @@ class CollectionController extends Controller
|
||||||
return $request->all();
|
return $request->all();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function store(Request $request, int $id)
|
public function store(Request $request, $id)
|
||||||
{
|
{
|
||||||
abort_if(!Auth::check(), 403);
|
abort_if(!Auth::check(), 403);
|
||||||
$this->validate($request, [
|
$this->validate($request, [
|
||||||
'title' => 'nullable',
|
'title' => 'nullable',
|
||||||
'description' => 'nullable',
|
'description' => 'nullable',
|
||||||
'visibility' => 'required|alpha|in:public,private'
|
'visibility' => 'nullable|string|in:public,private'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$profile = Auth::user()->profile;
|
$profile = Auth::user()->profile;
|
||||||
|
@ -140,7 +140,7 @@ class CollectionController extends Controller
|
||||||
return 200;
|
return 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get(Request $request, int $id)
|
public function get(Request $request, $id)
|
||||||
{
|
{
|
||||||
$profile = Auth::check() ? Auth::user()->profile : [];
|
$profile = Auth::check() ? Auth::user()->profile : [];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue