cleanup
This commit is contained in:
@@ -53,26 +53,21 @@ import { And, Email, Required } from "../helpers/validate";
|
|||||||
import { useToastStore } from "../store/ToastStore";
|
import { useToastStore } from "../store/ToastStore";
|
||||||
import SMLoading from "../components/SMLoading.vue";
|
import SMLoading from "../components/SMLoading.vue";
|
||||||
|
|
||||||
// const { executeRecaptcha, recaptchaLoaded } = useReCaptcha();
|
|
||||||
const formDone = ref(false);
|
const formDone = ref(false);
|
||||||
let form = reactive(
|
let form = reactive(
|
||||||
Form({
|
Form({
|
||||||
email: FormControl("", And([Required(), Email()])),
|
email: FormControl("", And([Required(), Email()])),
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
form.loading(true);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// await recaptchaLoaded();
|
form.loading(true);
|
||||||
// const captcha = await executeRecaptcha("submit");
|
|
||||||
|
|
||||||
await api.post({
|
await api.post({
|
||||||
url: "/users/forgotPassword",
|
url: "/users/forgotPassword",
|
||||||
body: {
|
body: {
|
||||||
email: form.controls.email.value,
|
email: form.controls.email.value,
|
||||||
// captcha_token: captcha,
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -57,13 +57,13 @@ const formDone = ref(false);
|
|||||||
let form = reactive(
|
let form = reactive(
|
||||||
Form({
|
Form({
|
||||||
email: FormControl("", And([Required(), Email()])),
|
email: FormControl("", And([Required(), Email()])),
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
form.loading(true);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
form.loading(true);
|
||||||
|
|
||||||
await api.post({
|
await api.post({
|
||||||
url: "/users/resendVerifyEmailCode",
|
url: "/users/resendVerifyEmailCode",
|
||||||
body: {
|
body: {
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ let form = reactive(
|
|||||||
Form({
|
Form({
|
||||||
code: FormControl("", And([Required(), Min(6), Max(6)])),
|
code: FormControl("", And([Required(), Min(6), Max(6)])),
|
||||||
password: FormControl("", And([Required(), Password()])),
|
password: FormControl("", And([Required(), Password()])),
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (useRoute().query.code !== undefined) {
|
if (useRoute().query.code !== undefined) {
|
||||||
@@ -66,9 +66,8 @@ if (useRoute().query.code !== undefined) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
form.loading(true);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
form.loading(true);
|
||||||
await api.post({
|
await api.post({
|
||||||
url: "/users/resetPassword",
|
url: "/users/resetPassword",
|
||||||
body: {
|
body: {
|
||||||
|
|||||||
Reference in New Issue
Block a user