This commit is contained in:
2023-07-28 08:17:33 +10:00
parent 8a54fb272a
commit 31ed355d64
3 changed files with 7 additions and 13 deletions

View File

@@ -53,26 +53,21 @@ import { And, Email, Required } from "../helpers/validate";
import { useToastStore } from "../store/ToastStore";
import SMLoading from "../components/SMLoading.vue";
// const { executeRecaptcha, recaptchaLoaded } = useReCaptcha();
const formDone = ref(false);
let form = reactive(
Form({
email: FormControl("", And([Required(), Email()])),
})
}),
);
const handleSubmit = async () => {
form.loading(true);
try {
// await recaptchaLoaded();
// const captcha = await executeRecaptcha("submit");
form.loading(true);
await api.post({
url: "/users/forgotPassword",
body: {
email: form.controls.email.value,
// captcha_token: captcha,
},
});

View File

@@ -57,13 +57,13 @@ const formDone = ref(false);
let form = reactive(
Form({
email: FormControl("", And([Required(), Email()])),
})
}),
);
const handleSubmit = async () => {
form.loading(true);
try {
form.loading(true);
await api.post({
url: "/users/resendVerifyEmailCode",
body: {

View File

@@ -53,7 +53,7 @@ let form = reactive(
Form({
code: FormControl("", And([Required(), Min(6), Max(6)])),
password: FormControl("", And([Required(), Password()])),
})
}),
);
if (useRoute().query.code !== undefined) {
@@ -66,9 +66,8 @@ if (useRoute().query.code !== undefined) {
}
const handleSubmit = async () => {
form.loading(true);
try {
form.loading(true);
await api.post({
url: "/users/resetPassword",
body: {