Shift to consistent, fluent response chains

This commit is contained in:
Shift
2023-03-30 14:15:17 +00:00
parent 66c246852c
commit 1eeb9eaece
28 changed files with 69 additions and 69 deletions
@@ -48,7 +48,7 @@ class PasswordSecurityController extends Controller
]
);
return redirect('2fa')->with('success', 'Secret Key is generated, Please verify Code to Enable 2FA');
return redirect()->to('2fa')->with('success', 'Secret Key is generated, Please verify Code to Enable 2FA');
}
/**
@@ -65,10 +65,10 @@ class PasswordSecurityController extends Controller
$user->passwordSecurity->google2fa_enable = 1;
$user->passwordSecurity->save();
return redirect('2fa')->with('success', '2FA is Enabled Successfully.');
return redirect()->to('2fa')->with('success', '2FA is Enabled Successfully.');
}
return redirect('2fa')->with('error', 'Invalid Verification Code, Please try again.');
return redirect()->to('2fa')->with('error', 'Invalid Verification Code, Please try again.');
}
public function disable2fa(Disable2faPasswordSecurityRequest $request): \Illuminate\Routing\Redirector|\Illuminate\Http\RedirectResponse|\Illuminate\Contracts\Foundation\Application
@@ -83,6 +83,6 @@ class PasswordSecurityController extends Controller
$user->passwordSecurity->google2fa_enable = 0;
$user->passwordSecurity->save();
return redirect('2fa')->with('success', '2FA is now Disabled.');
return redirect()->to('2fa')->with('success', '2FA is now Disabled.');
}
}