Skip to content

Commit

Permalink
Merge pull request #2955 from glific/cleanup
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
kurund authored Jul 3, 2024
2 parents 775dab1 + 2428e01 commit a4ba002
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 28 deletions.
11 changes: 0 additions & 11 deletions src/containers/Auth/ConfirmOTP/ConfirmOTP.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,6 @@ export const ConfirmOTP = () => {
})
.catch((error) => {
setAuthError(t('We are unable to register, kindly contact your technical team.'));
// add log's
setLogs(
`onSubmitOTP:${{
user: {
name: userObject.name,
phone: userObject.phone,
otp: values.OTP,
},
}} URL:${VITE_GLIFIC_REGISTRATION_API}`,
'info'
);
setLogs(error, 'error');
});
};
Expand Down
2 changes: 0 additions & 2 deletions src/containers/Auth/Login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ export const Login = () => {
} else if (error?.response?.data?.error) {
setAuthError(error?.response?.data?.error?.message);
}
// add log's
// setLogs(`phoneNumber:${values.phoneNumber} URL:${USER_SESSION}`, 'info');
setLogs(error, 'error');
});
};
Expand Down
6 changes: 0 additions & 6 deletions src/containers/Auth/ResetPassword/ResetPasswordConfirmOTP.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@ export const ResetPasswordConfirmOTP = () => {
})
.catch((error) => {
setAuthError(t('We are unable to update your password, please enter the correct OTP.'));
// add log's
setLogs(
`phoneNumber:${values.phoneNumber} otp: ${values.OTP} URL:${RESET_PASSWORD}`,
'info'
);
setLogs(error, 'error');
});
};

Expand Down
9 changes: 0 additions & 9 deletions src/services/AuthService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ export const renewAuthToken = () => {
.post(RENEW_TOKEN)
.then((response: any) => response)
.catch((error: any) => {
// add log's
setLogs(`renewalToken:${renewalToken} URL:${RENEW_TOKEN}`, 'info');
setLogs(error, 'error');
// if we are not able to renew the token for some weird reason or if refresh token
throw error;
});
Expand Down Expand Up @@ -125,12 +122,6 @@ export const sendOTP = (phoneNumber: string, registrationToken?: string) => {
})
.then((response) => response)
.catch((error) => {
// add log's
setLogs(
`phoneNumber:${phoneNumber} registration:${user.registration} URL:${VITE_GLIFIC_AUTHENTICATION_API}`,
'info'
);
setLogs(error, 'error');
throw error;
});
};
Expand Down

0 comments on commit a4ba002

Please sign in to comment.