mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-23 21:43:17 +00:00
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)
|
||||
{
|
||||
$this->validate($request, [
|
||||
'item' => 'required|integer',
|
||||
'item' => 'required|string',
|
||||
]);
|
||||
$item = $request->input('item');
|
||||
$item = (int) $request->input('item');
|
||||
$this->handleFollowRequest($item);
|
||||
if($request->wantsJson()) {
|
||||
return response()->json([
|
||||
200
|
||||
], 200);
|
||||
}
|
||||
return redirect()->back();
|
||||
return response()->json(200);
|
||||
}
|
||||
|
||||
protected function handleFollowRequest($item)
|
||||
|
|
Loading…
Reference in a new issue