Finished Forgot Password request, Reset Password request
This commit is contained in:
@@ -30,12 +30,16 @@ export function setAuthRequestError(exception) {
|
||||
error["Email"] = error.email;
|
||||
delete error["email"];
|
||||
}
|
||||
if (error.password) {
|
||||
error["Password"] = error.password;
|
||||
delete error["password"];
|
||||
}
|
||||
if (error.password1) {
|
||||
error["Password"] = error.password1;
|
||||
delete error["password1"];
|
||||
}
|
||||
if (error.password2) {
|
||||
error["Password Confirmation"] = error.password2;
|
||||
error["Confirm Password"] = error.password2;
|
||||
delete error["password2"];
|
||||
}
|
||||
if (error.non_field_errors) {
|
||||
@@ -58,6 +62,14 @@ export function setAuthRequestError(exception) {
|
||||
error["Confirm New Password"] = error.new_password2;
|
||||
delete error["new_password2"];
|
||||
}
|
||||
if (error.token) {
|
||||
error["Token"] = error.token;
|
||||
delete error["token"];
|
||||
}
|
||||
if (error.uid) {
|
||||
error["UID"] = error.uid;
|
||||
delete error["uid"];
|
||||
}
|
||||
|
||||
return {
|
||||
type: SET_AUTH_REQUEST_ERROR,
|
||||
|
@@ -3,7 +3,9 @@ import {
|
||||
SEND_EMAIL_VERIFICATION_REQUEST,
|
||||
SEND_LOGIN_REQUEST,
|
||||
SEND_LOGOUT_REQUEST,
|
||||
SEND_CHANGE_PASSWORD_REQUEST
|
||||
SEND_CHANGE_PASSWORD_REQUEST,
|
||||
SEND_FORGOT_PASSWORD_REQUEST,
|
||||
SEND_RESET_PASSWORD_REQUEST
|
||||
} from "../../constants/auth.constants";
|
||||
|
||||
export function sendRegisterRequest(postBody) {
|
||||
@@ -30,12 +32,26 @@ export function sendLoginRequest(postBody) {
|
||||
export function sendLogoutRequest() {
|
||||
return {
|
||||
type: SEND_LOGOUT_REQUEST
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function sendChangePasswordRequest(postBody) {
|
||||
return {
|
||||
type: SEND_CHANGE_PASSWORD_REQUEST,
|
||||
data: postBody
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function sendForgotPasswordRequest(postBody) {
|
||||
return {
|
||||
type: SEND_FORGOT_PASSWORD_REQUEST,
|
||||
data: postBody
|
||||
};
|
||||
}
|
||||
|
||||
export function sendResetPasswordRequest(postBody) {
|
||||
return {
|
||||
type: SEND_RESET_PASSWORD_REQUEST,
|
||||
data: postBody
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user