Skip to content

Commit 8cca46b

Browse files
author
Gareth Redfern
committed
redirect if auth now sends a 200 with message
1 parent 4cf46ae commit 8cca46b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Http/Middleware/RedirectIfAuthenticated.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function handle(Request $request, Closure $next, ...$guards)
2424
foreach ($guards as $guard) {
2525
if (Auth::guard($guard)->check()) {
2626
if ($request->expectsJson()) {
27-
return response()->json(['error' => 'Already authenticated.'], 400);
27+
return response()->json(['message' => 'Already authenticated.'], 200);
2828
}
2929
return redirect(RouteServiceProvider::HOME);
3030
}

0 commit comments

Comments
 (0)