forked from mirror/pixelfed
Update FollowerController
This commit is contained in:
parent
c539e8f607
commit
d9db1cf8b1
1 changed files with 3 additions and 8 deletions
|
@ -23,16 +23,11 @@ class FollowerController extends Controller
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
$this->validate($request, [
|
$this->validate($request, [
|
||||||
'item' => 'required|integer',
|
'item' => 'required|string',
|
||||||
]);
|
]);
|
||||||
$item = $request->input('item');
|
$item = (int) $request->input('item');
|
||||||
$this->handleFollowRequest($item);
|
$this->handleFollowRequest($item);
|
||||||
if($request->wantsJson()) {
|
return response()->json(200);
|
||||||
return response()->json([
|
|
||||||
200
|
|
||||||
], 200);
|
|
||||||
}
|
|
||||||
return redirect()->back();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function handleFollowRequest($item)
|
protected function handleFollowRequest($item)
|
||||||
|
|
Loading…
Reference in a new issue