Skip to content

Commit

Permalink
Merge pull request #124 from odoogap/develop
Browse files Browse the repository at this point in the history
[FIX] - Using corrent mutation on reset password
  • Loading branch information
inNetto authored Sep 24, 2024
2 parents 323dbf6 + 9edc27d commit ce18d5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions domains/auth/composables/useAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export const useAuth = () => {
}

toast.success("Password changed successfully");
router.push("/");
};

const isAuthenticated = computed(() => {
Expand Down
8 changes: 4 additions & 4 deletions domains/auth/pages/forgot-password/new-password.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { SfButton, SfInput, SfIconVisibility } from "@storefront-ui/vue";
import { useToast } from "vue-toastification";
import type { MutationChangePasswordArgs } from "~/graphql";
const { updatePassword } = useAuth();
const { changeForgottenPassword } = useAuth();
const route = useRoute();
const toast = useToast();
Expand All @@ -29,9 +29,9 @@ const handleSubmit = async () => {
return;
}
await updatePassword({
currentPassword: changePasswordArgs.value.newPassword,
newPassword: changePasswordArgs.value.token,
await changeForgottenPassword({
newPassword: changePasswordArgs.value.newPassword,
token: changePasswordArgs.value.token,
});
};
</script>
Expand Down

0 comments on commit ce18d5f

Please sign in to comment.