改进 未实名的状态吗返回 401
This commit is contained in:
parent
b5a99ffbca
commit
1b0412b1ad
@ -28,7 +28,7 @@ public function handle(Request $request, Closure $next, string $guard = 'web'):
|
||||
if (auth($guard)->check()) {
|
||||
if ($request->user($guard)->real_name_verified_at === null) {
|
||||
if ($request->expectsJson()) {
|
||||
return $this->error('您还没有实名认证。');
|
||||
return $this->unauthorized('您还没有实名认证。');
|
||||
}
|
||||
|
||||
return redirect()->route('real_name.create');
|
||||
|
Loading…
Reference in New Issue
Block a user