Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
inmanturbo authored and github-actions[bot] committed Jun 24, 2024
1 parent 78966df commit 7fd7d0d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions stubs/one-app/app/Http/Middleware/DomainMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function handle(Request $request, Closure $next): Response
{
$domain = $request->getHost();

if(! auth()->check()) {
if (! auth()->check()) {
return $next($request);
}

Expand All @@ -28,14 +28,13 @@ public function handle(Request $request, Closure $next): Response
}

if ($request->user()->currentTeam->domain !== $domain) {
if ($request->user()->currentTeam->domain) {
return redirect($request->user()->currentTeam->url);
if ($request->user()->currentTeam->domain) {
return redirect($request->user()->currentTeam->url);
}

return redirect(config('app.url') . config('fortify.home'));
return redirect(config('app.url').config('fortify.home'));
}

return $next($request);
}
}

0 comments on commit 7fd7d0d

Please sign in to comment.