1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-24 16:53:17 +00:00

Update BaseApiController, invalidate session after account deletion

This commit is contained in:
Daniel Supernault 2020-02-19 22:53:04 -07:00
parent 3c62fa79c5
commit 826978ce08
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -314,6 +314,10 @@ class BaseApiController extends Controller
{
$user = $request->user();
abort_if(!$user, 403);
if($user->status != null) {
Auth::logout();
return redirect('/login');
}
$resource = new Fractal\Resource\Item($user->profile, new AccountTransformer());
$res = $this->fractal->createData($resource)->toArray();
return response()->json($res);