Skip to content

Commit

Permalink
fix: replace temp error messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinBuyck committed Dec 20, 2023
1 parent ecccf84 commit 354f1f4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 0 additions & 2 deletions backend/core/src/auth/services/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,6 @@ export class UserService {
}

if (user.confirmationToken !== token) {
console.log(user.confirmationToken)
console.log(token)
throw new HttpException(USER_ERRORS.TOKEN_MISSING.message, USER_ERRORS.TOKEN_MISSING.status)
}
user.hitConfirmationURL = new Date()
Expand Down
2 changes: 0 additions & 2 deletions sites/partners/src/components/users/FormUserConfirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ const FormUserConfirm = () => {
]

useEffect(() => {
console.log("In useEffect")
if (!isTokenChecked && token) {
console.log("checking token")
userService
.isUserConfirmationTokenValid({ body: { token } })
.then((res) => {
Expand Down
4 changes: 2 additions & 2 deletions sites/partners/src/pages/reset-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const ResetPassword = () => {
const { password, passwordConfirmation } = data

try {
await resetPassword(token.toString(), password, passwordConfirmation)
setSiteAlertMessage(t(`account.settings.passwordSuccess`), "notice")
const user = await resetPassword(token.toString(), password, passwordConfirmation)
setSiteAlertMessage(t(`authentication.signIn.success`, { name: user.firstName }), "success")
await router.push("/")
window.scrollTo(0, 0)
} catch (err) {
Expand Down
6 changes: 3 additions & 3 deletions sites/public/src/pages/reset-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ const ResetPassword = () => {
const { password, passwordConfirmation } = data

try {
await resetPassword(token.toString(), password, passwordConfirmation)
setSiteAlertMessage(t(`account.settings.passwordSuccess`), "notice")
await router.push("/sign-in")
const user = await resetPassword(token.toString(), password, passwordConfirmation)
setSiteAlertMessage(t(`authentication.signIn.success`, { name: user.firstName }), "success")
await router.push("/account/dashboard")
} catch (err) {
const { status, data } = err.response || {}
if (status === 400) {
Expand Down

0 comments on commit 354f1f4

Please sign in to comment.