mirror of
https://github.com/documenso/documenso.git
synced 2025-11-10 04:22:32 +10:00
Avoid consecutive password reset requests
This commit is contained in:
@ -29,21 +29,20 @@ export default function ForgotPassword() {
|
||||
loading: "Sending...",
|
||||
success: `Reset link sent. `,
|
||||
error: "Could not send reset link :/",
|
||||
},
|
||||
{
|
||||
style: {
|
||||
minWidth: "200px",
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
toast.dismiss();
|
||||
|
||||
if (response.status == 400 || response.status == 404) {
|
||||
if (response.status == 404) {
|
||||
toast.error("Email address not found.");
|
||||
}
|
||||
|
||||
if (response.status == 400) {
|
||||
toast.error("Password reset requested.");
|
||||
}
|
||||
|
||||
if (response.status == 500) {
|
||||
toast.error("Something went wrong.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user